--- /dev/null
+From 3383d23d86791503559cb87837491af37469d9e5 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Wed, 17 Feb 2010 18:04:35 +0000
+Subject: gpiolib: Actually set output state in wm831x_gpio_direction_output()
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit 3383d23d86791503559cb87837491af37469d9e5 upstream.
+
+wm831x_gpio_direction_output() ignored the state passed into it.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpio/wm831x-gpio.c | 22 +++++++++++++++-------
+ 1 file changed, 15 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpio/wm831x-gpio.c
++++ b/drivers/gpio/wm831x-gpio.c
+@@ -61,23 +61,31 @@ static int wm831x_gpio_get(struct gpio_c
+ return 0;
+ }
+
+-static int wm831x_gpio_direction_out(struct gpio_chip *chip,
+- unsigned offset, int value)
++static void wm831x_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+ {
+ struct wm831x_gpio *wm831x_gpio = to_wm831x_gpio(chip);
+ struct wm831x *wm831x = wm831x_gpio->wm831x;
+
+- return wm831x_set_bits(wm831x, WM831X_GPIO1_CONTROL + offset,
+- WM831X_GPN_DIR | WM831X_GPN_TRI, 0);
++ wm831x_set_bits(wm831x, WM831X_GPIO_LEVEL, 1 << offset,
++ value << offset);
+ }
+
+-static void wm831x_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
++static int wm831x_gpio_direction_out(struct gpio_chip *chip,
++ unsigned offset, int value)
+ {
+ struct wm831x_gpio *wm831x_gpio = to_wm831x_gpio(chip);
+ struct wm831x *wm831x = wm831x_gpio->wm831x;
++ int ret;
+
+- wm831x_set_bits(wm831x, WM831X_GPIO_LEVEL, 1 << offset,
+- value << offset);
++ ret = wm831x_set_bits(wm831x, WM831X_GPIO1_CONTROL + offset,
++ WM831X_GPN_DIR | WM831X_GPN_TRI, 0);
++ if (ret < 0)
++ return ret;
++
++ /* Can only set GPIO state once it's in output mode */
++ wm831x_gpio_set(chip, offset, value);
++
++ return 0;
+ }
+
+ #ifdef CONFIG_DEBUG_FS
--- /dev/null
+From a44908d742a577fb5ccb9a8c082326d4cea234c2 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <khali@linux-fr.org>
+Date: Fri, 5 Mar 2010 22:17:25 +0100
+Subject: hwmon: (tmp421) Fix temperature conversions
+
+From: Jean Delvare <khali@linux-fr.org>
+
+commit a44908d742a577fb5ccb9a8c082326d4cea234c2 upstream.
+
+The low bits of temperature registers are status bits, they must be
+masked out before converting the register values to temperatures.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Tested-by: Andre Prendel <andre.prendel@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/tmp421.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/hwmon/tmp421.c
++++ b/drivers/hwmon/tmp421.c
+@@ -81,14 +81,16 @@ struct tmp421_data {
+
+ static int temp_from_s16(s16 reg)
+ {
+- int temp = reg;
++ /* Mask out status bits */
++ int temp = reg & ~0xf;
+
+ return (temp * 1000 + 128) / 256;
+ }
+
+ static int temp_from_u16(u16 reg)
+ {
+- int temp = reg;
++ /* Mask out status bits */
++ int temp = reg & ~0xf;
+
+ /* Add offset for extended temperature range. */
+ temp -= 64 * 256;
--- /dev/null
+From 8d59582a867470a3e0c3eced4a01625ae8dc546b Mon Sep 17 00:00:00 2001
+From: Jean Delvare <khali@linux-fr.org>
+Date: Fri, 5 Mar 2010 22:17:25 +0100
+Subject: hwmon: (tmp421) Restore missing inputs
+
+From: Jean Delvare <khali@linux-fr.org>
+
+commit 8d59582a867470a3e0c3eced4a01625ae8dc546b upstream.
+
+An off-by-one error caused some inputs to not be created by the driver
+when they should. TMP421 gets only one input instead of two, TMP422
+gets two instead of three, etc. Fix the bug by listing explicitly the
+number of inputs each device has.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Tested-by: Andre Prendel <andre.prendel@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/tmp421.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/drivers/hwmon/tmp421.c
++++ b/drivers/hwmon/tmp421.c
+@@ -62,9 +62,9 @@ static const u8 TMP421_TEMP_LSB[4] = {
+ #define TMP423_DEVICE_ID 0x23
+
+ static const struct i2c_device_id tmp421_id[] = {
+- { "tmp421", tmp421 },
+- { "tmp422", tmp422 },
+- { "tmp423", tmp423 },
++ { "tmp421", 2 },
++ { "tmp422", 3 },
++ { "tmp423", 4 },
+ { }
+ };
+ MODULE_DEVICE_TABLE(i2c, tmp421_id);
+@@ -74,7 +74,7 @@ struct tmp421_data {
+ struct mutex update_lock;
+ char valid;
+ unsigned long last_updated;
+- int kind;
++ int channels;
+ u8 config;
+ s16 temp[4];
+ };
+@@ -110,7 +110,7 @@ static struct tmp421_data *tmp421_update
+ data->config = i2c_smbus_read_byte_data(client,
+ TMP421_CONFIG_REG_1);
+
+- for (i = 0; i <= data->kind; i++) {
++ for (i = 0; i < data->channels; i++) {
+ data->temp[i] = i2c_smbus_read_byte_data(client,
+ TMP421_TEMP_MSB[i]) << 8;
+ data->temp[i] |= i2c_smbus_read_byte_data(client,
+@@ -169,7 +169,7 @@ static mode_t tmp421_is_visible(struct k
+ devattr = container_of(a, struct device_attribute, attr);
+ index = to_sensor_dev_attr(devattr)->index;
+
+- if (data->kind > index)
++ if (index < data->channels)
+ return a->mode;
+
+ return 0;
+@@ -277,7 +277,7 @@ static int tmp421_probe(struct i2c_clien
+
+ i2c_set_clientdata(client, data);
+ mutex_init(&data->update_lock);
+- data->kind = id->driver_data;
++ data->channels = id->driver_data;
+
+ err = tmp421_init_client(client);
+ if (err)
usb-fix-i2c-api-usage-in-ohci-pnx4008.patch
p54usb-add-the-usb-id-for-belkin-accton-fd7050e-ver-1010ec.patch
p54pci-handle-dma-mapping-errors.patch
+gpiolib-actually-set-output-state-in-wm831x_gpio_direction_output.patch
+hwmon-tmp421-fix-temperature-conversions.patch
+hwmon-tmp421-restore-missing-inputs.patch