On Fri, 03 Oct 2008 12:11:24 +0100
Andy Green <[EMAIL PROTECTED]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jonas Bonn wrote:
> > This chip is a regular I2C device and does not really need to be
> > set up as a platform device.  This patch thus changes the driver
> > definition and converts the I2C bits to the new-style I2C interface
> > at the same time.
> 
> >     /* now we try to detect the chip */
> > -
> > -   /* register with i2c core */
> > -   err = i2c_attach_client(new_client);
> > -   if (err) {
> > -           dev_err(&new_client->dev,
> > -                   "error during i2c_attach_client()\n");
> > -           goto exit_free;
> > -   }
> > +   // FIXME: Detect chip????
> > +   /* */
> 
> In I2C protocol if the chip at the address is not present it won't ACK
> at the first opportunity and transactions will fail.  So all that's
> needed here is first regular register transaction should bail from
> probe if it returned -E*.
> 
> > -/* We have this purely to capture an early indication that we are
> > coming out
> > - * of suspend, before our device resume got called; async
> > interrupt service is
> > - * interested in this.
> > - */
> > -
> > -static int pcf50606_plat_resume(struct platform_device *pdev)
> > -{
> > -   /* i2c_get_clientdata(to_i2c_client(&pdev->dev)) returns
> > NULL at this
> > -    * early resume time so we have to use pcf50606_global
> > -    */
> > -   pcf50606_global->suspend_state =
> > PCF50606_SS_RESUMING_BUT_NOT_US_YET; -
> > -   return 0;
> > -}
> 
> Dunno about 50606 but I think the equivalent was important on 50633
> resume sequencing.  Did you confirm it suspend / resumes OK still?

Andy,

Let me see if suspend/resume plays well with the changes I've
introduced. I forgot to test that one.

        - Balaji

Reply via email to