Re: [PATCHv3 2/2] i2c: cadence: Implement save restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >> zynq-mp has the capability of going off.
> >> the current kernel does not hit off however some day it will.
> >> since the overhead of having the support is not much may be it is better to have it in the kernel.
> >
> > This sounds like the patch is not tested?
> to simulate the suspend behavior I  did a reset of the module by writing to
> slcr register.
> And then did a transfer.

I'd prefer a patch which is tested under the actual condition. So, let's
wait until proper suspend support is added.

> >> +static void cdns_i2c_init(struct cdns_i2c *id)
> >> +{
> >> +     cdns_i2c_writereg(id->ctrl_reg, CDNS_I2C_CR_OFFSET);
> >> +     /*
> >> +      * Cadence I2C controller has a bug wherein it generates
> >> +      * invalid read transaction after HW timeout in master receiver mode.
> >> +      * HW timeout is not used by this driver and the interrupt is disabled.
> >> +      * But the feature itself cannot be disabled. Hence maximum value
> >> +      * is written to this register to reduce the chances of error.
> >> +      */
> >> +     cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET);
> >> +}
> >
> > This...
> 
> Writes the values to the register.
> 
> >
> >> +
> >> +/**
> >>   * cdns_i2c_runtime_resume - Runtime resume
> >>   * @dev:     Address of the platform_device structure
> >>   *
> >> @@ -853,6 +874,7 @@ static int __maybe_unused cdns_i2c_runtime_resume(struct device *dev)
> >>               dev_err(dev, "Cannot enable clock.\n");
> >>               return ret;
> >>       }
> >> +     cdns_i2c_init(xi2c);
> >
> > and this...
> At resume .
> (Actually this could be conditional however since we have 2 registers
> so can be unconditioal)
> >
> >> -
> >> -     /*
> >> -      * Cadence I2C controller has a bug wherein it generates
> >> -      * invalid read transaction after HW timeout in master receiver mode.
> >> -      * HW timeout is not used by this driver and the interrupt is disabled.
> >> -      * But the feature itself cannot be disabled. Hence maximum value
> >> -      * is written to this register to reduce the chances of error.
> >> -      */
> >> -     cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET);
> >> +     cdns_i2c_init(id);
> 
> And at init.

I understand what it does, but I don't see any connection to the
caching mentioned in the subject. So, this is maybe a seperate patch or
the commit message must be updated.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux