All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Nicolas Saenz Julienne <nicolas.saenz@prodys.net>
Cc: robh+dt@kernel.org, mark.rutland@arm.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/2] power: supply: add sbs-charger driver
Date: Wed, 23 Nov 2016 14:36:16 +0100	[thread overview]
Message-ID: <20161123133615.js74ap6dnplg55ks@earth> (raw)
In-Reply-To: <1479900044-19270-2-git-send-email-nicolas.saenz@prodys.net>

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

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@prodys.net>
> ---
>  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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Nicolas Saenz Julienne
	<nicolas.saenz-gbiq2sxWoaasTnJN9+BGXg@public.gmane.org>
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] power: supply: add sbs-charger driver
Date: Wed, 23 Nov 2016 14:36:16 +0100	[thread overview]
Message-ID: <20161123133615.js74ap6dnplg55ks@earth> (raw)
In-Reply-To: <1479900044-19270-2-git-send-email-nicolas.saenz-gbiq2sxWoaasTnJN9+BGXg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]

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-gbiq2sxWoaasTnJN9+BGXg@public.gmane.org>
> ---
>  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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2016-11-23 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 11:20 [PATCH 0/2] power: supply: add sbs-charger driver Nicolas Saenz Julienne
2016-11-23 11:20 ` [PATCH 1/2] " Nicolas Saenz Julienne
2016-11-23 13:36   ` Sebastian Reichel [this message]
2016-11-23 13:36     ` Sebastian Reichel
2016-11-23 11:20 ` [PATCH 2/2] dt-bindings: power: add bindings for sbs-charger Nicolas Saenz Julienne
2016-11-23 13:45   ` Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123133615.js74ap6dnplg55ks@earth \
    --to=sre@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.saenz@prodys.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.