1. 24 Jan, 2021 1 commit
  2. 17 Jan, 2021 1 commit
    • Randy Dunlap's avatar
      power: supply: fix sbs-charger build, needs REGMAP_I2C · a4bdea20
      Randy Dunlap authored
      CHARGER_SBS should select REGMAP_I2C since it uses API(s) that are
      provided by that Kconfig symbol.
      
      Fixes these errors:
      
      ../drivers/power/supply/sbs-charger.c:149:21: error: variable ‘sbs_regmap’ has initializer but incomplete type
       static const struct regmap_config sbs_regmap = {
      ../drivers/power/supply/sbs-charger.c:150:3: error: ‘const struct regmap_config’ has no member named ‘reg_bits’
        .reg_bits = 8,
      ../drivers/power/supply/sbs-charger.c:155:23: error: ‘REGMAP_ENDIAN_LITTLE’ undeclared here (not in a function)
        .val_format_endian = REGMAP_ENDIAN_LITTLE, /* since based on SMBus */
      ../drivers/power/supply/sbs-charger.c: In function ‘sbs_probe’:
      ../drivers/power/supply/sbs-charger.c:183:17: error: implicit declaration of function ‘devm_regmap_init_i2c’; did you mean ‘devm_request_irq’? [-Werror=implicit-function-declaration]
        chip->regmap = devm_regmap_init_i2c(client, &sbs_regmap);
      ../drivers/power/supply/sbs-charger.c: At top level:
      ../drivers/power/supply/sbs-charger.c:149:35: error: storage size of ‘sbs_regmap’ isn’t known
       static const struct regmap_config sbs_regmap = {
      
      Fixes: feb583e3 ("power: supply: add sbs-charger driver")
      Reported-by: default avatarMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Tested-by: default avatarMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      a4bdea20
  3. 16 Jan, 2021 10 commits
  4. 15 Jan, 2021 2 commits
  5. 14 Jan, 2021 17 commits
  6. 13 Jan, 2021 6 commits
  7. 12 Jan, 2021 3 commits
    • Mike Looijmans's avatar
      power/supply: Add ltc4162-l-charger · cd900f18
      Mike Looijmans authored
      Add support for the LTC4162-L Li-Ion battery charger. The driver allows
      reading back telemetry and to set some charging options like the input
      current limit.
      Signed-off-by: default avatarMike Looijmans <mike.looijmans@topic.nl>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      cd900f18
    • Linus Walleij's avatar
      power: supply: max8903: Convert to GPIO descriptors · 50da8d04
      Linus Walleij authored
      The MAX8903 uses up to 5 different GPIO lines to control and
      monitor charging.
      
      When converting to use GPIO descriptors instead of the old
      GPIO numbers the following side-refactorings were done:
      
      - Decomission the platform data container struct as all
        GPIO descriptors are now "live" members of the driver
        state container. The "dc_valid" and "usb_valid" just
        indicate the presence of a DC or USB charger detection
        line, and this can be handled by just checking if
        the optional GPIO descriptor for each is != NULL.
      
      - The gpiolib will now respect the GPIO_ACTIVE_LOW flag
        for each of the lines, meaning gpiod_get_value() for example
        will return 1 (asserted) if a line is flagged as
        active low and is also physically low. The same applies
        to output lines, vice versa mutatis mutandis. The code
        has been augmented to account for this in all sites.
      
      - The terse parenthesis such as this:
          gpio_set_value(pdata->cen, ta_in ? 0 :
                           (data->usb_in ? 0 : 1));
        have been expanded to more readable if / else if / else
        statements that are easier for humans to read.
      
      - Comments were inserted to underscore polarity in each
        case where it could be confusing to users of the old code.
      
      One thing is notable: the device tree bindings does not show
      an example of polarity assigned for the line "dcm-gpios"
      DC current monitor, is assumed to be flagged GPIO_ACTIVE_HIGH
      and driving it high (asserted) will achieve DC charger current
      limits and driving it low will achieve USB charger current
      limits. Device trees with this (optional) GPIO line defined
      should definately be flagged as GPIO_ACTIVE_HIGH.
      
      Cc: Chris Lapa <chris@lapa.com.au>
      Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      50da8d04
    • Linus Walleij's avatar
      power: supply: max8903: Absorb pdata header · 3188677d
      Linus Walleij authored
      The platform data header is not included by any other file in
      the kernel but the driver itself. Decomission the stand-alone
      header and absorb it into the driver itself.
      
      Cc: Chris Lapa <chris@lapa.com.au>
      Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
      3188677d