linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: saravanan sekar <sravanhome@gmail.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: lee.jones@linaro.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, jic23@kernel.org,
	lars@metafoo.de, andy.shevchenko@gmail.com,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 5/6] power: supply: Add support for mp2733 battery charger
Date: Sun, 25 Sep 2022 11:26:24 +0200	[thread overview]
Message-ID: <77f13cfe-58dc-d150-18a9-cb14c82f222a@gmail.com> (raw)
In-Reply-To: <20220911133101.7g6hnwp3dnnqrmgb@mercury.elektranox.org>

Hi Sebastian,

On 11/09/22 15:31, Sebastian Reichel wrote:
> Hi,
> 
> On Wed, Jun 15, 2022 at 04:53:56PM +0200, Saravanan Sekar wrote:
>> mp2733 is updated version of mp2629 battery charge management
>> which supports USB fast-charge and higher range of input voltage.
>>
>> Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
>> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>> ---
>> [...]
>>   	psy_cfg.drv_data = charger;
>> -	psy_cfg.attr_grp = mp2629_charger_sysfs_groups;
>> +	if (charger->chip_info->has_impedance)
>> +		psy_cfg.attr_grp = mp2629_charger_sysfs_groups;
>> +
>> +	if (charger->chip_info->has_fast_charge)
>> +		psy_cfg.attr_grp = mp2733_charger_sysfs_groups;
>> +
>>   	charger->battery = devm_power_supply_register(dev,
>>   					 &mp2629_battery_desc, &psy_cfg);
>>   	if (IS_ERR(charger->battery)) {
> 
> Instead of having has_impedance and has_fast_charge feature
> flag that are mutual exclusive, store the device type and
> use if/else or switch statement to chose the correct attr_grp.

these flags are not really mutual exclusive, limitation only for 
application between mp2629 and mp2629. In future another chipset on
same series shall have both or none, so I would consider to control 
flags with functionality rather than chipset !

Please feedback if still I have to consider your proposal.

> Other than that:
> 
> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> 
> -- Sebastian

Thanks,
Saravanan


  reply	other threads:[~2022-09-25  9:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-15 14:53 [PATCH v3 0/6] Add support for mp2733 battery charger Saravanan Sekar
2022-06-15 14:53 ` [PATCH v3 1/6] iio: adc: mp2629: fix wrong comparison of channel Saravanan Sekar
2022-06-18 16:23   ` Jonathan Cameron
2022-06-18 17:27     ` saravanan sekar
2022-06-15 14:53 ` [PATCH v3 2/6] dt-bindings: mfd: Add mp2733 compatible Saravanan Sekar
2022-06-27 14:45   ` Lee Jones
2022-07-01 21:32     ` Rob Herring
2022-07-04  8:53       ` Lee Jones
2022-06-15 14:53 ` [PATCH v3 3/6] mfd: mp2629: Add support for mps mp2733 battery charger Saravanan Sekar
2022-06-27 12:36   ` Lee Jones
2022-06-15 14:53 ` [PATCH v3 4/6] iio: adc: mp2629: restrict input voltage mask for mp2629 Saravanan Sekar
2022-06-18 16:19   ` Jonathan Cameron
2022-06-15 14:53 ` [PATCH v3 5/6] power: supply: Add support for mp2733 battery charger Saravanan Sekar
2022-09-11 13:31   ` Sebastian Reichel
2022-09-25  9:26     ` saravanan sekar [this message]
2022-10-01 21:05       ` Sebastian Reichel
2022-06-15 14:53 ` [PATCH v3 6/6] power: supply: mp2629: Add USB fast charge settings Saravanan Sekar
2022-07-21 15:50 ` [PATCH v3 0/6] Add support for mp2733 battery charger saravanan sekar
2022-07-22  8:14   ` Lee Jones

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=77f13cfe-58dc-d150-18a9-cb14c82f222a@gmail.com \
    --to=sravanhome@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).