[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240503093227.GN1227636@google.com>
Date: Fri, 3 May 2024 10:32:27 +0100
From: Lee Jones <lee@...nel.org>
To: Min Li <lnimi@...mail.com>
Cc: linux-kernel@...r.kernel.org, Min Li <min.li.xe@...esas.com>
Subject: Re: [PATCH mfd v2 1/2] mfd: rsmu: support I2C SMBus access
On Wed, 01 May 2024, Min Li wrote:
> From: Min Li <min.li.xe@...esas.com>
>
> 8a3400x device implements its own reg_read and reg_write,
> which only supports I2C bus access. This patch adds support
> for SMBus access.
>
> Signed-off-by: Min Li <min.li.xe@...esas.com>
> ---
> - Provide cover-letter suggested by Lee
>
> drivers/mfd/rsmu_i2c.c | 107 +++++++++++++++++++++++++++++++++++------
> drivers/mfd/rsmu_spi.c | 8 +--
> 2 files changed, 97 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/mfd/rsmu_i2c.c b/drivers/mfd/rsmu_i2c.c
> index 5711e512b..cba64f107 100644
> --- a/drivers/mfd/rsmu_i2c.c
> +++ b/drivers/mfd/rsmu_i2c.c
> @@ -32,6 +32,8 @@
> #define RSMU_SABRE_PAGE_ADDR 0x7F
> #define RSMU_SABRE_PAGE_WINDOW 128
>
> +typedef int (*rsmu_rw_device)(struct rsmu_ddata *rsmu, u8 reg, u8 *buf, u8 bytes);
We're not going to start passing around function points all over the
place. Use a variable 'bool smbus'(?) instead and call the correct
helper based on that instead.
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists