public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux@fluff.org>
To: vidhumouli hunsigida <hv_mouli@yahoo.com>
Cc: i2c@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: Supporting new features in I2C
Date: Fri, 12 Sep 2008 17:35:35 +0100	[thread overview]
Message-ID: <20080912163534.GD1916@fluff.org.uk> (raw)
In-Reply-To: <863377.52660.qm@web57102.mail.re3.yahoo.com>

On Fri, Sep 12, 2008 at 06:35:43AM -0700, vidhumouli hunsigida wrote:
> The I2C host controller chip has two features named
> HOLD and Slave Monitor.
> 
> HOLD is the typical feature of holding the clock low to support for the slow devices.
> It can be enabled or disabled through software control by writing a bit in the registor.

This should be normal behaviour for an i2c bus, some controllers
can support it, but there is no need to add any extra functionality
to the i2c layer for this. The driver is free to do it or not do it.

If you want to driver to do either, then you can either have it as a
module parameter and/or have some configuration file in sysfs to change
the state.
 
> I am writing a bus driver for this core.
> I am not sure where and how this provision is to be added in the I2C adapter code.
> 
> I could not find any such provision in the exising bus drivers.
> I could not find any related information in the Linux kernel documentation.
> 
> Can any one give me how can this be done?
> 
> Similarly for Slave Monitor, where a host monitors for the ack received from the slave device.
> This can also be enabled/disabled by setting a bit in the register. How is this to be handled in the current i2c adapter code?

I suggest you have a look at the drivers in drivers/i2c/busses and
also include/linux/i2c.h (pay particual attention to 'struct i2c_algorithm'
which can be used to add new bus drivers).

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

      reply	other threads:[~2008-09-12 16:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 13:35 Supporting new features in I2C vidhumouli hunsigida
2008-09-12 16:35 ` Ben Dooks [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080912163534.GD1916@fluff.org.uk \
    --to=ben-linux@fluff.org \
    --cc=hv_mouli@yahoo.com \
    --cc=i2c@lm-sensors.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox