Hi, On Wed, Nov 23, 2016 at 12:20:43PM +0100, Nicolas Saenz Julienne wrote: > This adds support for sbs-charger compilant chips as defined here: > http://sbs-forum.org/specs/sbc110.pdf > > This was tested on a arm board connected to an LTC41000 battery charger > chip. > > Signed-off-by: Nicolas Saenz Julienne <nicolas.saenz@xxxxxxxxxx> > --- > v1 -> v2: > - add spec link in header > - use proper gpio/interrupt interface > - update regmap configuration (max register & endianness) > - dropped oldschool .supplied_to assignments > - use devm_* APIs Thanks. Looks almost fine now. > drivers/power/supply/Kconfig | 6 + > drivers/power/supply/Makefile | 1 + > drivers/power/supply/sbs-charger.c | 264 +++++++++++++++++++++++++++++++++++++ > 3 files changed, 271 insertions(+) > create mode 100644 drivers/power/supply/sbs-charger.c > > [...] > > +static const struct regmap_config sbs_regmap = { > + .reg_bits = 8, > + .val_bits = 16, > + .max_register = SBS_CHARGER_REG_ALARM_WARNING, > + .volatile_reg = sbs_volatile_reg, > + .val_format_endian = REGMAP_ENDIAN_LITTLE, /* since based on SMBus */ > +}; Please provide at least a readable_reg marking the range from 0x00-0x10 unreadable. You can check this with cat /sys/kernel/debug/regmap/sbs-charger/registers > [...] -- Sebastian
Attachment:
signature.asc
Description: PGP signature