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

    Javier Martinez Canillas
     
  • 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

    Krzysztof Kozlowski
     

19 Sep, 2014

1 commit


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

    Chen Gang
     
  • 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

    NeilBrown
     
  • 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

    NeilBrown
     
  • 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

    NeilBrown
     

27 Aug, 2013

1 commit


02 Apr, 2013

1 commit


07 Feb, 2013

1 commit


02 Feb, 2013

1 commit


29 Nov, 2012

3 commits


24 Jul, 2012

2 commits


24 Mar, 2012

2 commits


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

    NeilBrown