lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240111105426.GA1678981@google.com>
Date: Thu, 11 Jan 2024 10:54:26 +0000
From: Lee Jones <lee@...nel.org>
To: Karel Balej <karelb@...li.ms.mff.cuni.cz>
Cc: Karel Balej <balejk@...fyz.cz>, Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Duje Mihanović <duje.mihanovic@...le.hr>,
	~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org
Subject: Re: [RFC PATCH 1/5] mfd: 88pm88x: differences with respect to the
 PMIC RFC series

The subject needs work.  Please tell us what the patches is doing.

On Thu, 28 Dec 2023, Karel Balej wrote:

> From: Karel Balej <balejk@...fyz.cz>

A full an complete commit message is a must.

> Signed-off-by: Karel Balej <balejk@...fyz.cz>
> ---
>  drivers/mfd/88pm88x.c       | 14 ++++++++------
>  include/linux/mfd/88pm88x.h |  2 ++
>  2 files changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mfd/88pm88x.c b/drivers/mfd/88pm88x.c
> index 5db6c65b667d..3424d88a58f6 100644
> --- a/drivers/mfd/88pm88x.c
> +++ b/drivers/mfd/88pm88x.c
> @@ -57,16 +57,16 @@ static struct reg_sequence pm886_presets[] = {
>  	REG_SEQ0(PM88X_REG_BK_OSC_CTRL3, 0xc0),
>  };
>  
> -static struct resource onkey_resources[] = {
> +static struct resource pm88x_onkey_resources[] = {
>  	DEFINE_RES_IRQ_NAMED(PM88X_IRQ_ONKEY, "88pm88x-onkey"),
>  };
>  
> -static struct mfd_cell pm88x_devs[] = {
> +static struct mfd_cell pm886_devs[] = {
>  	{
>  		.name = "88pm88x-onkey",
> -		.num_resources = ARRAY_SIZE(onkey_resources),
> -		.resources = onkey_resources,
> -		.id = -1,
> +		.of_compatible = "marvell,88pm88x-onkey",
> +		.num_resources = ARRAY_SIZE(pm88x_onkey_resources),
> +		.resources = pm88x_onkey_resources,
>  	},
>  };
>  
> @@ -74,6 +74,8 @@ static struct pm88x_data pm886_a1_data = {
>  	.whoami = PM886_A1_WHOAMI,
>  	.presets = pm886_presets,
>  	.num_presets = ARRAY_SIZE(pm886_presets),
> +	.devs = pm886_devs,
> +	.num_devs = ARRAY_SIZE(pm886_devs),
>  };
>  
>  static const struct regmap_config pm88x_i2c_regmap = {
> @@ -157,7 +159,7 @@ static int pm88x_probe(struct i2c_client *client)
>  	if (ret)
>  		return ret;
>  
> -	ret = devm_mfd_add_devices(&client->dev, 0, pm88x_devs, ARRAY_SIZE(pm88x_devs),
> +	ret = devm_mfd_add_devices(&client->dev, 0, chip->data->devs, chip->data->num_devs,
>  			NULL, 0, regmap_irq_get_domain(chip->irq_data));
>  	if (ret) {
>  		dev_err(&client->dev, "Failed to add devices: %d\n", ret);
> diff --git a/include/linux/mfd/88pm88x.h b/include/linux/mfd/88pm88x.h
> index a34c57447827..9a335f6b9c07 100644
> --- a/include/linux/mfd/88pm88x.h
> +++ b/include/linux/mfd/88pm88x.h
> @@ -49,6 +49,8 @@ struct pm88x_data {
>  	unsigned int whoami;
>  	struct reg_sequence *presets;
>  	unsigned int num_presets;
> +	struct mfd_cell *devs;
> +	unsigned int num_devs;

Why are you adding extra abstraction?

>  };
>  
>  struct pm88x_chip {
> -- 
> 2.43.0
> 

-- 
Lee Jones [李琼斯]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ