From: Marco Aurelio da Costa <costa-nrw9SyMmU14AvxtiuMwx3w@public.gmane.org>
To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: pca9665
Date: Fri, 19 Sep 2008 08:37:25 -0300 [thread overview]
Message-ID: <48D38EF5.60303@gamic.com> (raw)
In-Reply-To: <20080919100819.GC4307-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Hi Wolfram,
Wolfram Sang wrote:
> Hello Marco,
>
> sorry for the late reply, I had to work on other parts first.
>
No problem.
> On Wed, Sep 17, 2008 at 12:30:29PM -0300, Marco Aurelio da Costa wrote:
>
>
>> I looked into the code for i2c-algo-pca.c and, if I don't want to
>> implement the buffered mode (I can live without it for a while),
>>
>
> But it may be worth to already get a rough idea if the buffered mode
> will fit into this algorithm at all.
>
I will have to understand the buffered mode first, but at worse I will
have to check which mode is being used and add another logic path.
>
>> only changes I need to do are:
>> 1. Implement the reset via parallel bus.
>>
>
> I can't see this point right now. The algorithm expects a reset routine
> from the driver using the algorithm; this should be flexible enough, no?
> Or do you mean you also want to share i2c-pca-platform.c among those two
> chips. Then it's correct to change it there. Otherwise, please enlighten
> me, it's been some time :)
>
My ideas was to share the platform and the isa code. This is easy
enough. For the PCA9665, the platform will not define the reset
function, and the algorithm will not even try use it.
>
>> 2. Change the way the i2c clock rate is treated, by passing the
>> frequency directly instead of an index.
>>
>
> Yup, this has to be generalized between these two.
>
I can do that then. We should then pass the frequency. For the 9564, I
will just accept the chip defined frequencies.
>
>> After this, this module could handle both chips. I need your advice:
>> Should I just duplicate all code and make the changes to this new algo
>> or should I add a chip_type field to i2c_algo_pca_data and handle the
>> chip on the existing algo code?
>>
>
> Concerning the algorithm, I'd really go for the latter. It is easier to
> maintain if there will be bugfixes to the state-machine, for example.
> And they seem to be similar enough (perhaps modulo the buffered mode,
> which I didn't look at so far).
>
That is also my view. I will start coding, and will send you the patch
for review later.
> All the best,
>
> Wolfram
>
>
Regards,
Marco
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
next prev parent reply other threads:[~2008-09-19 11:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 15:30 pca9665 Marco Aurelio da Costa
[not found] ` <48D12295.8080008-nrw9SyMmU14AvxtiuMwx3w@public.gmane.org>
2008-09-19 10:08 ` pca9665 Wolfram Sang
[not found] ` <20080919100819.GC4307-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-09-19 11:37 ` Marco Aurelio da Costa [this message]
[not found] ` <48D38EF5.60303-nrw9SyMmU14AvxtiuMwx3w@public.gmane.org>
2008-09-19 11:56 ` pca9665 Wolfram Sang
[not found] ` <20080919115605.GE4307-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2008-09-19 12:09 ` pca9665 Marco Aurelio da Costa
[not found] ` <48D39691.1070905-nrw9SyMmU14AvxtiuMwx3w@public.gmane.org>
2008-09-19 12:32 ` pca9665 Jean Delvare
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=48D38EF5.60303@gamic.com \
--to=costa-nrw9symmu14avxtiumwx3w@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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