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] [day] [month] [year] [list]
Message-ID: <20210120183950.GA867982@BV030612LT>
Date:   Wed, 20 Jan 2021 20:39:50 +0200
From:   Cristian Ciocaltea <cristian.ciocaltea@...il.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Sebastian Reichel <sre@...nel.org>,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Andreas Färber <afaerber@...e.de>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-actions@...ts.infradead.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH v5 3/7] mfd: Add MFD driver for ATC260x PMICs

On Wed, Jan 20, 2021 at 08:33:48AM +0000, Lee Jones wrote:
> On Wed, 13 Jan 2021, Cristian Ciocaltea wrote:
> 
> > Add initial support for the Actions Semi ATC260x PMICs which integrates
> > Audio Codec, Power management, Clock generation and GPIO controller
> > blocks.
> > 

[...]

> > +	/* Initialize the hardware */
> > +	atc260x->dev_init(atc260x);
> > +
> > +	ret = regmap_read(atc260x->regmap, atc260x->rev_reg, &chip_rev);
> > +	if (ret) {
> > +		dev_err(dev, "Failed to get chip revision\n");
> > +		return ret;
> > +	}
> > +
> > +	if (chip_rev > 31) {
> 
> Nit: If you have to respin this, please define this magic number.
> 

[...]

> > +static struct i2c_driver atc260x_i2c_driver = {
> > +	.driver = {
> > +		.name	= "atc260x",
> > +		.of_match_table	= of_match_ptr(atc260x_i2c_of_match),
> > +	},
> > +	.probe		= atc260x_i2c_probe,
> > +};
> 
> Nit: These spacings/line-ups just look odd.
> 
> Please stick to one ' ' after the '='.

[...]

> > +	const char *type_name;
> > +	unsigned int rev_reg;
> > +
> > +	int (*dev_init)(struct atc260x *atc260x);
> 
> Ah, I didn't see this before.
> 
> Call-backs of this nature are the devil.  Please populate a struct
> with the differentiating register addresses/values instead and always
> call a generic deivce_init().

I have implemented this, including the other 2 suggestions above, in
the already submitted revision v6.

Thanks,
Cristi

> > +};
> > +
> > +struct regmap_config;
> > +
> > +int atc260x_match_device(struct atc260x *atc260x, struct regmap_config *regmap_cfg);
> > +int atc260x_device_probe(struct atc260x *atc260x);
> > +
> > +#endif /* __LINUX_MFD_ATC260X_CORE_H */
> 
> -- 
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ