14 Apr, 2016
1 commit
-
If choose_times() returns -EINVAL that means "c1" and "c2" haven't been
initialized. I've added a check for that.Signed-off-by: Dan Carpenter
Signed-off-by: Jacek Anaszewski
07 Jan, 2016
1 commit
-
This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().Cc: Riku Voipio
Cc: Richard Purdie
Cc: linux-leds@vger.kernel.org
Acked-by: Jacek Anaszewski
Signed-off-by: Linus Walleij
19 Nov, 2015
1 commit
-
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:@@
struct gpio_chip *var;
@@
-var->dev
+var->parentand:
@@
struct gpio_chip var;
@@
-var.dev
+var.parentand:
@@
struct bgpio_chip *var;
@@
-var->gc.dev
+var->gc.parentPlus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.Cc: Haavard Skinnemoen
Cc: Rafał Miłecki
Cc: Richard Purdie
Cc: Mauro Carvalho Chehab
Cc: Alek Du
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Acked-by: Dmitry Torokhov
Acked-by: Greg Kroah-Hartman
Acked-by: Lee Jones
Acked-by: Jiri Kosina
Acked-by: Hans-Christian Egtvedt
Acked-by: Jacek Anaszewski
Signed-off-by: Linus Walleij
28 Aug, 2015
2 commits
-
The I2C core always reports the MODALIAS uevent as "i2c:"
regardless of the mechanism that was used to register the device
(i.e: OF or board code) and the table that is used later to match
the driver with the device (i.e: I2C id table or OF match table).So drivers needs to export the I2C id table and this be built into
the module or udev won't have the necessary information to autoload
the needed driver module when the device is added.But this means that OF-only drivers needs to have both OF and I2C id
tables that have to be kept in sync and also the dev node compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same I2C device name for example.To avoid the above, the I2C core behavior may be changed in the future
to not require an SPI device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table even when
is unused now to prevent breaking module loading when the core changes.Signed-off-by: Javier Martinez Canillas
Signed-off-by: Jacek Anaszewski -
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Jacek Anaszewski
19 Sep, 2014
1 commit
-
this remove all reference to gpio_remove retval in all driver
except pinctrl and gpio. the same thing is done for gpio and
pinctrl in two different patches.Signed-off-by: Abdoulaye Berthe
Acked-by: Michael Büsch
Acked-by: Dmitry Torokhov
Acked-by: Mauro Carvalho Chehab
Acked-by: Tomi Valkeinen
Signed-off-by: Linus Walleij
28 Jan, 2014
4 commits
-
Need check CONFIG_GPIOLIB whether defined, just like another area has
done within this file. Or can not pass compiling when CONFIG_GPIOLIB
disabled.The related error (with allmodconfig for metag):
CC [M] drivers/leds/leds-tca6507.o
drivers/leds/leds-tca6507.c: In function 'tca6507_led_dt_init':
drivers/leds/leds-tca6507.c:731: error: 'struct tca6507_platform_data' has no member named 'gpio_base'Signed-off-by: Chen Gang
Signed-off-by: Bryan Wu -
In particular fix the capitalisation of GPIO and LED and
correct TCA6507_MAKE_CPIO, but also rewrite the comment about
platform-data to include reference to devicetree.Also re-wrap comments to fit 80 columns.
Reported-by: Bryan Wu
Signed-off-by: NeilBrown
Signed-off-by: Bryan Wu -
The 7 lines driven by the TCA6507 can either drive LEDs or act as output-only
GPIOs.To make this distinction in devicetree we use the "compatible" property.
If the device attached to a line is "compatible" with "gpio", we treat it
like a GPIO. If it is "compatible" with "led" (or if no "compatible" value
is set) we treat it like an LED.(cooloney@gmail.com: fix typo in the subject)
Signed-off-by: NeilBrown
Signed-off-by: Bryan Wu -
1/ The led_info array must be allocated to allow the full number
of LEDs even if not all are present. The array maybe be sparsely
filled but it is indexed by device address so we must at least
allocate as many slots as the highest address used. It is easiest
just to allocate all 7.2/ range check the 'reg' value properly.
3/ led.flags must be initialised to zero, else all leds could
be treated as GPIOs (depending on what happens to be on the stack).Signed-off-by: NeilBrown
Signed-off-by: Bryan Wu
27 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Bryan Wu
02 Apr, 2013
1 commit
-
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.Signed-off-by: Sachin Kamat
Signed-off-by: Bryan Wu
07 Feb, 2013
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Bryan Wu
02 Feb, 2013
1 commit
-
Support added only for leds (not for gpio's).
(cooloney@gmail.com: fix 2 building errors)
Signed-off-by: Marek Belisko
Signed-off-by: Bryan Wu
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Richard Purdie
Cc: Jan-Simon Moeller
Acked-by: Bryan Wu
Signed-off-by: Greg Kroah-Hartman
24 Jul, 2012
2 commits
-
Cc: Neil Brown
Signed-off-by: Bryan Wu -
Signed-off-by: Peter Meerwald
Cc: NeilBrown
Signed-off-by: Bryan Wu
24 Mar, 2012
2 commits
-
A few new i2c-drivers came into the kernel which clear the
clientdata-pointer on exit or error. This is obsolete meanwhile, the
core will do it.Signed-off-by: Wolfram Sang
Cc: NeilBrown
Cc: Richard Purdie
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Just a small tidy-up.
1) There is a NULL dereference if the tca allocation fails.
2) The call to cancel_work_sync() isn't needed because we haven't
scheduled any work.
3) The call to i2c_set_clientdata() isn't needed because the core
handles that automatically if probe() fails.
4) I added some curly braces for style reasons.Signed-off-by: Dan Carpenter
Cc: Richard Purdie
Acked-by: NeilBrown
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2012
1 commit
-
TI's TCA6507 is the LED driver in the GTA04 Openmoko motherboard. The
driver provides full support for brightness levels and hardware blinking.This driver can drive each of 7 outputs as an LED or a GPIO output,
and provides hardware-assist blinking.[akpm@linux-foundation.org: fix __mod_i2c_device_table alias]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: NeilBrown
Cc: Richard Purdie
Cc: Randy Dunlap
Cc: Dan Carpenter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds