Re: [RFC PATCH] WIP: i2c: rcar: add HostNotify support

Alain Volmat
2020-07-01T14:37:45Z

On Wed, Jul 01, 2020 at 03:21:45PM +0200, Wolfram Sang wrote:
>
> > > I got another idea. What about a boolean binding "smbus"?
> ...
> >
> > I much prefer this solution than the usage of the smbus_alert irq value
> > (in case of the i2c-stm32f7). In that case, I'd only set smbus boolean
> > to enable both SMBus Host-Notify & SMBus Alert.
>
> Correct.
>
> > In case of a device having a dedicated irq for SMBus Alert, smbus_alert
> > irq binding would still be needed.
>
> Yes, that was my idea. Let's use "smbus".

Hum ... sorry ... I'm having some doubt about such a generic 'smbus' naming.
I mean, stating 'smbus' within the controller node kind of says
"I am working in SMBus mode", and not only "I am supporting Host-Notify & Alert".
In such case, NOT having 'smbus' would mean that the driver do not support
SMBUS and SMBus xfer and all smbus related stuff would get disabled ...
We for sure do not want to have everybody add a smbus property in their DT
if they support SMBus xfer for example.

This is probably too wide, don't you think ?

>
> > Just my 2 cents about another aspect regarding SMBus Alert, since alert
> > is coming from another pin and not the usual SCL / SCK, when SMBus Alert
> > has to be used, there is a very good chance to have a pinctrl entry which
> > is different from not using SMBus Alert.
> > Indeed, even if we need SMBus, but don't need SMBus Alert, the SMBus Alert
> > input pin might be used for something else.
> > But this of course doesn't prevent to use the smbus boolean binding.
>
> I am not sure if I fully get this point. Either we have a dedicated line
> (your case) or we need to use a GPIO as an interrupt line (my case). So,
> either this is configured correctly in DT and added as a "smbus_alert"
> irq. Or this irq is missing and then the driver will ignore SMBusAlert
> and the GPIO can be freely used/muxed. Or?
>