public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>,
	linux-i2c@vger.kernel.org, Sanket.Goswami@amd.com
Subject: Re: [PATCH v4 1/8] i2c: piix4: Change the signature of piix4_transaction function
Date: Thu, 12 Sep 2024 11:52:47 +0530	[thread overview]
Message-ID: <b77c4100-55a6-472d-9ea8-b9d4ef4c8f01@amd.com> (raw)
In-Reply-To: <gjtjzjana2yrgkcoxets4gtgovnldzd5tbytgzba7unqce7tlm@w6zqwkbbndhd>

Hi Andi

On 9/12/2024 11:45, Andi Shyti wrote:
> Hi Shyam,
> 
> what does it mean signature? Do you mean "parameter list"?

Yes. I mean "parameter list". I can amend it in the next version.

Thanks,
Shyam

> 
> Andi
> 
> On Wed, Sep 11, 2024 at 05:24:00PM GMT, Shyam Sundar S K wrote:
>> Currently, `piix4_transaction()` accepts only one parameter, which is the
>> `i2c_adapter` information. This approach works well as long as SB800 SMBus
>> port accesses are confined to the piix4 driver. However, with the
>> implementation of a separate ASF driver and the varying address spaces
>> across drivers, it is necessary to change the function signature of
>> `piix4_transaction()` to include the port address. This modification
>> allows other drivers that use piix4 to pass the specific port details they
>> need to operate on.
>>
>> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
>> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
>> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
>> ---
>>  drivers/i2c/busses/i2c-piix4.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
>> index 4e32d57ae0bf..69b362db6d0c 100644
>> --- a/drivers/i2c/busses/i2c-piix4.c
>> +++ b/drivers/i2c/busses/i2c-piix4.c
>> @@ -536,10 +536,8 @@ static int piix4_setup_aux(struct pci_dev *PIIX4_dev,
>>  	return piix4_smba;
>>  }
>>  
>> -static int piix4_transaction(struct i2c_adapter *piix4_adapter)
>> +static int piix4_transaction(struct i2c_adapter *piix4_adapter, unsigned short piix4_smba)
>>  {
>> -	struct i2c_piix4_adapdata *adapdata = i2c_get_adapdata(piix4_adapter);
>> -	unsigned short piix4_smba = adapdata->smba;
>>  	int temp;
>>  	int result = 0;
>>  	int timeout = 0;
>> @@ -675,7 +673,7 @@ static s32 piix4_access(struct i2c_adapter * adap, u16 addr,
>>  
>>  	outb_p((size & 0x1C) + (ENABLE_INT9 & 1), SMBHSTCNT);
>>  
>> -	status = piix4_transaction(adap);
>> +	status = piix4_transaction(adap, piix4_smba);
>>  	if (status)
>>  		return status;
>>  
>> -- 
>> 2.25.1
>>

  reply	other threads:[~2024-09-12  6:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 11:53 [PATCH v4 0/8] Introduce initial AMD ASF Controller driver support Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 1/8] i2c: piix4: Change the signature of piix4_transaction function Shyam Sundar S K
2024-09-12  6:15   ` Andi Shyti
2024-09-12  6:22     ` Shyam Sundar S K [this message]
2024-09-11 11:54 ` [PATCH v4 2/8] i2c: piix4: Move i2c_piix4 macros and structures to common header Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 3/8] i2c: piix4: Export i2c_piix4 driver functions as library Shyam Sundar S K
2024-09-12  7:40   ` Andi Shyti
2024-09-13  6:24     ` Shyam Sundar S K
2024-09-13  8:36       ` Andi Shyti
2024-09-11 11:54 ` [PATCH v4 4/8] i2c: amd-asf: Add ACPI support for AMD ASF Controller Shyam Sundar S K
2024-09-11 15:16   ` Andy Shevchenko
2024-09-11 16:37     ` Shyam Sundar S K
2024-09-11 16:50       ` Andy Shevchenko
2024-09-11 16:59       ` Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 5/8] i2c: amd-asf: Add i2c_algorithm operations to support AMD ASF with SMBus Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 6/8] i2c: amd-asf: Add routine to handle the ASF slave process Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 7/8] i2c: amd-asf: Clear remote IRR bit to get successive interrupt Shyam Sundar S K
2024-09-11 11:54 ` [PATCH v4 8/8] MAINTAINERS: Add AMD ASF driver entry Shyam Sundar S K

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=b77c4100-55a6-472d-9ea8-b9d4ef4c8f01@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=Sanket.Goswami@amd.com \
    --cc=andi.shyti@kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox