drivers/misc/lis3lv02d: add generic DT matching code

Adds logic to parse lis3 properties from a device tree node and store them
in a freshly allocated lis3lv02d_platform_data.

Note that the actual match tables are left out here.  This part should
happen in the drivers that bind to the individual busses (SPI/I2C/PCI).

Also adds some DT bindinds documentation.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: "AnilKumar, Chimata" <anilkumar@ti.com>
Reviewed-by: Éric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Esse commit está contido em:
Daniel Mack
2012-09-26 13:58:16 -07:00
commit de Greg Kroah-Hartman
commit cbac1a8b89
3 arquivos alterados com 233 adições e 0 exclusões

Ver arquivo

@@ -314,6 +314,10 @@ struct lis3lv02d {
struct lis3lv02d_platform_data *pdata; /* for passing board config */
struct mutex mutex; /* Serialize poll and selftest */
#ifdef CONFIG_OF
struct device_node *of_node;
#endif
};
int lis3lv02d_init_device(struct lis3lv02d *lis3);