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: <ZlYwJryxeZ2LAKYG@surfacebook.localdomain>
Date: Tue, 28 May 2024 22:27:34 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-pwm@...r.kernel.org,
	Alexandru Ardelean <alexandru.ardelean@...log.com>,
	Bartosz Golaszewski <brgl@...ev.pl>,
	Conor Dooley <conor+dt@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Lee Jones <lee@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Rob Herring <robh@...nel.org>,
	Uwe Kleine-König <ukleinek@...nel.org>,
	Haibo Chen <haibo.chen@....com>
Subject: Re: [PATCH v2 2/4] mfd: adp5585: Add Analog Devices ADP5585 core
 support

Tue, May 28, 2024 at 10:03:12PM +0300, Laurent Pinchart kirjoitti:
> From: Haibo Chen <haibo.chen@....com>
> 
> The ADP5585 is a 10/11 input/output port expander with a built in keypad
> matrix decoder, programmable logic, reset generator, and PWM generator.
> This driver supports the chip by modelling it as an MFD device, with two
> child devices for the GPIO and PWM functions.
> 
> The driver is derived from an initial implementation from NXP, available
> in commit 8059835bee19 ("MLK-25917-1 mfd: adp5585: add ADI adp5585 core
> support") in their BSP kernel tree. It has been extensively rewritten.

..

> +	tristate "Analog Devices ADP5585 MFD driver"
> +	select MFD_CORE
> +	select REGMAP_I2C
> +	depends on I2C && OF

Why OF?
No COMPILE_TEST?

..

+ array_size.h
+ device.h // e.g., devm_kzalloc()

> +#include <linux/module.h>
> +#include <linux/moduleparam.h>
> +#include <linux/init.h>
> +#include <linux/slab.h>
> +#include <linux/i2c.h>

> +#include <linux/of.h>
> +#include <linux/of_device.h>

You don't need them, instead of proxying...

> +#include <linux/mfd/core.h>
> +#include <linux/mfd/adp5585.h>

m is earlier than 'o', but with above drop no more issue :-)

..just include mod_devicetable.h.

> +#include <linux/regmap.h>

+ types.h // e.g., u8

..

> +	regmap_config = of_device_get_match_data(&i2c->dev);

We have i2c_get_match_data().

..

> +#ifndef __LINUX_MFD_ADP5585_H_
> +#define __LINUX_MFD_ADP5585_H_
> +
> +#include <linux/bits.h>

..

> +#define		ADP5585_MAN_ID(v)		(((v) & 0xf0) >> 4)

GENMASK()

..

> +#define		ADP5585_Rx_PULL_CFG_MASK	(3)

GENMASK()

Why parentheses in all of them, btw?

..

> +#define		ADP5585_C4_EXTEND_CFG_MASK	(1U << 6)

> +#define		ADP5585_R4_EXTEND_CFG_MASK	(1U << 5)

> +#define		ADP5585_R3_EXTEND_CFG_MASK	(3U << 2)

> +#define		ADP5585_R0_EXTEND_CFG_MASK	(1U << 0)

> +#define		ADP5585_OSC_FREQ_MASK		(3U << 5)

BIT() / GENMASK()

> +#endif

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ