[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHO=5PEeek5EiXk3ZAmXPFRQ4xKF4e3z-pe6Yq9t4iV+7AUJYw@mail.gmail.com>
Date: Fri, 24 Jul 2020 15:07:28 +0530
From: Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>
To: Wolfram Sang <wsa@...nel.org>
Cc: linux-i2c <linux-i2c@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
BCM Kernel Feedback <bcm-kernel-feedback-list@...adcom.com>,
Lori Hikichi <lori.hikichi@...adcom.com>,
Robert Richter <rrichter@...vell.com>,
Nishka Dasgupta <nishkadg.linux@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 2/2] i2c: iproc: add slave pec support
On Fri, Jul 24, 2020 at 1:50 AM Wolfram Sang <wsa@...nel.org> wrote:
>
>
> > + /* Enable partial slave HW PEC support if requested by the client */
> > + iproc_i2c->en_s_pec = !!(slave->flags & I2C_CLIENT_PEC);
> > + if (iproc_i2c->en_s_pec)
> > + dev_info(iproc_i2c->device, "Enable PEC\n");
>
> Where do you set the I2C_CLIENT_PEC flag for the slave? Is your backend
> code publicly available?
I2C_CLIENT_PEC should be set by backend before calling i2c_slave_register() ie
client->flags |= I2C_CLIENT_PEC;
ret = i2c_slave_register(client, i2c_slave_eeprom_slave_cb);
------
------
------
My backend code is not yet publicly available.
>
> I may need a second thought here, but I am not sure I2C_CLIENT_PEC is
> the right way to enable PEC. Isn't it actually depending on the backend
> if PEC is needed? I.e. is the backend an I2C device or an SMBus device?
>
Yes, it depends on the backend. If backend is SMBUS device and
supports PEC then it should set client->flags |= I2C_CLIENT_PEC,
before calling i2c_slave_register(), so that the slave bus driver will
enable PEC in device.
Best regards,
Rayagonda
Powered by blists - more mailing lists