mbox series

[0/2] Add charger support for the Nintendo Switch

Message ID 20230824112741.201353-1-linkmauve@linkmauve.fr
Headers show
Series Add charger support for the Nintendo Switch | expand

Message

Emmanuel Gil Peyrot Aug. 24, 2023, 11:27 a.m. UTC
These aren’t my patches, but are required in order to charge this
console.  I have tested them on a downstream 6.0 kernel[0] and they seem
to work properly.

This is the first part of a bunch of upstreaming I’m going to do for the
various drivers required to support this console in mainline.

[0] https://gitlab.azka.li/l4t-community/kernel/mainline/linux/-/commits/icosa-v6.0

Alexandre Courbot (2):
  power: supply: bq24190: Support bq24193
  power: supply: bq24190_charger: Export current regulator

 .../bindings/power/supply/bq24190.yaml        |  1 +
 drivers/power/supply/bq24190_charger.c        | 86 +++++++++++++++++++
 2 files changed, 87 insertions(+)

Comments

Krzysztof Kozlowski Aug. 24, 2023, 12:41 p.m. UTC | #1
On 24/08/2023 13:27, Emmanuel Gil Peyrot wrote:
> From: Alexandre Courbot <acourbot@nvidia.com>

Empty commit msg. Sorry, we cannot take such commits.

> 
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

Missing SoB.


> ---
>  drivers/power/supply/bq24190_charger.c | 84 ++++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/drivers/power/supply/bq24190_charger.c b/drivers/power/supply/bq24190_charger.c
> index a56122b39687..8c026e86aeb3 100644
> --- a/drivers/power/supply/bq24190_charger.c
> +++ b/drivers/power/supply/bq24190_charger.c
> @@ -530,6 +530,81 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
>  }
>  
>  #ifdef CONFIG_REGULATOR
> +static int bq24190_set_charging_current(struct regulator_dev *dev,
> +			int min_uA, int max_uA)
> +{
> +	struct bq24190_dev_info *bdi = rdev_get_drvdata(dev);
> +	u8 ss_reg;
> +	int in_current_limit;
> +	int ret = 0;
> +
> +	dev_info(bdi->dev, "Setting charging current %d mA\n", max_uA/1000);

This is not info. It would pollute log and it is not really necessary,
because regulator framework gives such information. You can make it
debug if you need for debug purposes.



Best regards,
Krzysztof
Emmanuel Gil Peyrot Aug. 24, 2023, 1:02 p.m. UTC | #2
On Thu, Aug 24, 2023 at 02:41:41PM +0200, Krzysztof Kozlowski wrote:
[…]
> > 
> > Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> 
> Missing SoB.

Do I need to add myself even if I didn’t change anything over what the
original author wrote?

[…]
> 
> Best regards,
> Krzysztof
> 

Thanks,
Krzysztof Kozlowski Aug. 24, 2023, 1:28 p.m. UTC | #3
On 24/08/2023 15:02, Emmanuel Gil Peyrot wrote:
> On Thu, Aug 24, 2023 at 02:41:41PM +0200, Krzysztof Kozlowski wrote:
> […]
>>>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>
>> Missing SoB.
> 
> Do I need to add myself even if I didn’t change anything over what the
> original author wrote?

Yes.

Best regards,
Krzysztof