From: Lee Jones <lee@kernel.org>
To: Min Li <lnimi@hotmail.com>
Cc: linux-kernel@vger.kernel.org, Min Li <min.li.xe@renesas.com>
Subject: Re: [PATCH mfd v2 1/2] mfd: rsmu: support I2C SMBus access
Date: Fri, 3 May 2024 10:32:27 +0100 [thread overview]
Message-ID: <20240503093227.GN1227636@google.com> (raw)
In-Reply-To: <LV3P220MB12021342F302AADEB6C1601CA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM>
On Wed, 01 May 2024, Min Li wrote:
> From: Min Li <min.li.xe@renesas.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@renesas.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 [李琼斯]
next prev parent reply other threads:[~2024-05-03 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240501163256.28463-1-lnimi@hotmail.com>
2024-05-01 16:32 ` [PATCH mfd v2 1/2] mfd: rsmu: support I2C SMBus access Min Li
2024-05-03 9:32 ` Lee Jones [this message]
2024-05-03 10:01 ` (subset) " Lee Jones
2024-05-01 16:32 ` [PATCH mfd v2 2/2] mfd: rsmu: add FemtoClock3 support Min Li
2024-05-03 9:36 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240503093227.GN1227636@google.com \
--to=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lnimi@hotmail.com \
--cc=min.li.xe@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.