[PATCH 1/2] hwmon: Add devicetree bindings to gpio-fan

2012-09-07 Thread Jamie Lentin
Allow a gpio-fan to be defined in devicetree, see binding documentation for details. Signed-off-by: Jamie Lentin --- .../devicetree/bindings/gpio/gpio-fan.txt | 25 + drivers/hwmon/gpio-fan.c | 111 2 files changed, 136 insertions(+)

Re: [PATCH 1/2] hwmon: Add devicetree bindings to gpio-fan

2012-09-08 Thread Andrew Lunn
Hi Jamie > +static int gpio_fan_get_of_pdata(struct device *dev, > + struct gpio_fan_platform_data *pdata) > +{ > + struct device_node *node; > + struct gpio_fan_speed *speed; > + unsigned *ctrl; > + unsigned i; > + u32 u; > + struct property *prop;