Re: [PATCH] rtc: Added support for ds1672 control



On Tue, 28 Mar 2006 16:04:20 -0600
Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx> wrote:

Not sure if I follow you here. I think you are suggesting for
ds1672_get_control to look like:

static int ds1672_get_control(struct i2c_client *client, u8 *status)
{
unsigned char addr = DS1672_REG_CONTROL;

struct i2c_msg msgs[] = {
{ client->addr, 0, 1, &addr }, /* setup
read ptr */
{ client->addr, I2C_M_RD, 1, status }, /* read
control */
};
...
}

yes.


which is fine. Any suggestions on what to do on an error in the
sysfs attrib function?

i2c_transfer will give the errno to return back.
This remembers me that I forgot to do that in other drivers :(

--

Best regards,

Alessandro Zummo,
Tower Technologies - Turin, Italy

http://www.towertech.it

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: AOL
    ... The cable companies OWN and CONTROL anything with THEIR IP addresses. ... but the IP address belongs to the cable company and since ... PTR record so the new IP you got will now reflect YOUR mail server. ...
    (microsoft.public.windows.server.sbs)
  • RE: thread & dialog based application
    ... You may not directly access main thread window controls from within any other ... how to get access to control values of that boxes.. ... struct userInterface * ptr; ...
    (microsoft.public.vc.mfc)
  • Re: pthread_*, errno and POSIX
    ... Speaking about pthreads implementation: do any standards ... explicitly allow or disallow to pthread_* functions to modify errno ... Does this pseudo code makes sense or just points to ... A single flow of control within a process. ...
    (comp.programming.threads)