[go: nahoru, domu]

History log of /drivers/gpio/gpio-ich.c
Revision Date Author Comments
9f5132ae82fdbb047cc187bf689a81c8cc0de7fa 12-Jul-2014 abdoulaye berthe <berthe.ab@gmail.com> gpio: remove all usage of gpio_remove retval in driver/gpio

Signed-off-by: abdoulaye berthe <berthe.ab@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
a7008ee1a423720e755e08f33b63669795c1f072 15-Apr-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: set regs and reglen for i3100 and ich6 chipset

This patch fixes kernel NULL pointer BUG introduced by the following commit:
b667cf488aa9476b0ab64acd91f2a96f188cfd21
gpio: ich: Add support for multiple register addresses.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Tested-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
3b9231893e5731e2212645a92f1d3d0776c58e1a 14-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add support for Intel Avoton

This patch adds support for Atom C2000 series (Avoton and Rangeley). And has
the following options:
- New addresses register.
- Caching output levels (see Intel external design spec, table 48-29)
- No hardware blink.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
e6540f332447b2fe5c2cd8774890c80f29fe5c75 14-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add output levels cache support

This patch allows GPIO driver to cache GPIO_LVL output registers. The aim is to
support chipsets on which GPIO_LVL value can't be read for output pins.

Caching output levels implies the first output values reading as 0. The driver
so can't be aware of set values GPIOs by bootloader or BIOS.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
bb62a35bd5d96e506af0ea8dd145480b9172a2a6 14-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add support for multiple register addresses

This patch introduces regs and reglen pointers which allow a chipset to have
register addresses differing from ICH ones.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ba7f74fe2bbac3a3bcc709e60066d3768a55ca7f 14-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add blink capability option

This patch allows gpio_ich driver to be aware of non blink capable chipsets.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ff2ed0491d9f6e8b1a0fa205324030588f9e4037 07-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add output levels cache support

This patch allows GPIO driver to cache GPIO_LVL output registers. The aim is to
support chipsets on which GPIO_LVL value can't be read for output pins.

Caching output levels implies the first output values reading as 0. The driver
so can't be aware of set values GPIOs by bootloader or BIOS.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
b667cf488aa9476b0ab64acd91f2a96f188cfd21 07-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add support for multiple register addresses

This patch introduces regs and reglen pointers which allow a chipset to have
register addresses differing from ICH ones.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e54674f898c4d3ad88b7ec604cf5e59e4170c4f5 07-Feb-2014 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: Add blink capability option

This patch allows gpio_ich driver to be aware of non blink capable chipsets.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9fb1f39eb2d6707d265087ee186376e24995f55a 04-Dec-2013 Linus Walleij <linus.walleij@linaro.org> gpio/pinctrl: make gpio_chip members typed boolean

This switches the two members of struct gpio_chip that were
defined as unsigned foo:1 to bool, because that is indeed what
they are. Switch all users in the gpio and pinctrl subsystems
to assign these values with true/false instead of 0/1. The
users outside these subsystems will survive since true/false
is 1/0, atleast we set some kind of more strict typing example.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e56aee1897fd27631c1cb28e12b0fb8f8f9736f7 30-Jul-2013 Jingoo Han <jg1.han@samsung.com> gpio: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
7f6569f54695c18e13be2c538834fdd0fad1d3a6 17-Jun-2013 Vincent Donnefort <vdonnefort@gmail.com> gpio: ich: add GPO_BLINK support

This patch makes sure blink hardware is disabled for selected GPIO. Blink
hardware is controled by GPO_BLINK register and is available for GPIOs from 0
to 31.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
61d793bbfb76ea6740dd1c1a4f2cdac57a0c1c5c 07-Mar-2013 Mika Westerberg <mika.westerberg@linux.intel.com> gpio/gpio-ich: make ichx_gpio_check_available() return a pure boolean value

It is more readable for humans to use double-bang (!!) to convert the value
to pure boolean before it is returned.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
25f27db48e9d741cf3494f36e287d3c34a0fdba3 05-Mar-2013 Jean Delvare <khali@linux-fr.org> gpio-ich: Check for pin availability at request time

Stop checking for pin availability in direction and get functions.
These functions can be called repeatedly, so checking every time is
bad for performance. Now that requesting GPIO pins is no longer
optional, checking for availability at pin request time is enough.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2ab3a749eb14c96eaf453afe6e678c9c1dab1637 05-Mar-2013 Jean Delvare <khali@linux-fr.org> gpio-ich: Fix value returned by ichx_gpio_request

Per Documentation/gpio.txt, gpio_request callbacks should return 0 on
success or a negative value on error. So it is not clear what was
meant by letting ichx_gpio_request return 1 in some cases, nor how a
caller would interpret it.

Align the code with the comment above it and consider pins as
available by default.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
e97f9b5277afeabb54892ebc6f68500098467ba1 27-Feb-2013 Mika Westerberg <mika.westerberg@linux.intel.com> gpio/gpio-ich: fix ichx_gpio_check_available() return what callers expect

ichx_gpio_check_available() returns either 0 or -ENXIO depending on whether
the given GPIO is available or not. However, callers of this function treat
the return value as boolean:

...
if (!ichx_gpio_check_available(gpio, nr))
return -ENXIO;

which erroneusly fails when the GPIO is available and not vice versa.

Fix this by making the function return boolean as expected by the callers.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
d39a948fef2446cfac3749bbfcfdd536335c3764 16-Dec-2012 Jean Delvare <khali@linux-fr.org> gpio/ich: Add missing spinlock init

As reported by CONFIG_DEBUG_SPINLOCK=y.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
206210ce68c1feb1d9d05839ceacc97ad1b0b324 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> gpio: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3836309d93462bbf34851c078be6e5e77d888e3d 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> gpio: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8283c4ff57bdf3c1d8985c86e4ef44e1bb70f1f6 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> gpio: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4f600ada70beeb1dfe08e11e871bf31015aa0a3d 23-Jul-2012 Jean Delvare <khali@linux-fr.org> gpio: gpio-ich: Share ownership of GPIO groups

The ICH chips have their GPIO pins organized in 2 or 3 independent
groups of 32 GPIO pins. It can happen that the ACPI BIOS wants to make
use of pins in one group, preventing the OS to access these. This does
not prevent the OS from accessing the other group(s).

This is the case for example on my Asus Z8NA-D6 board. The ACPI BIOS
wants to control GPIO 18 (group 1), while I (the OS) need to control
GPIO 52 and 53 (group 2) for SMBus multiplexing.

So instead of checking for ACPI resource conflict on the whole I/O
range, check on a per-group basis, and consider it a success if at
least one of the groups is available for the OS to use.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Aaron Sierra <asierra@xes-inc.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
6ed9f9c405f97cb7cda485f589cfa6c2bb3fb78e 18-Apr-2012 Peter Tyser <ptyser@xes-inc.com> gpio: Add support for Intel ICHx/3100/Series[56] GPIO

This driver works on many Intel chipsets, including the ICH6, ICH7,
ICH8, ICH9, ICH10, 3100, Series 5/3400 (Ibex Peak), Series 6/C200
(Cougar Point), and NM10 (Tiger Point).

Additional Intel chipsets should be easily supported if needed, eg the
ICH1-5, EP80579, etc.

Tested on QM67 (Cougar Point), QM57 (Ibex Peak), 3100 (Whitmore Lake),
and NM10 (Tiger Point).

Includes work from Jean Delvare:
- Resource leak removal during module load/unload
- GPIO API bit value enforcement

Also includes code cleanup from Guenter Roeck and Grant Likely.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>