linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Help about device driver in Linux
@ 1999-12-28  2:56 Shuangjun Zhu
  1999-12-28 17:35 ` Dan Malek
  0 siblings, 1 reply; 3+ messages in thread
From: Shuangjun Zhu @ 1999-12-28  2:56 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linuxppc-embedded


Hello, everyone

I want to make two device driver for MPC823,
one is for MPC823 Video, one is for MPC IIC.
Because in the Video driver, it must write configuration
parameters to the video controller through the IIC driver.

Question:
In the fuction cpm_823video_init(), can I call the cpm_823iic_write() ?
Otherwise, how can I do it?

Thanks in advacned!

BRs,
Shuangjun Zhu

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help about device driver in Linux
       [not found] <OF9209481E.5CD82FF1-ON00256855.00326F88@flaga.is>
@ 1999-12-28 16:53 ` Dan Malek
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Malek @ 1999-12-28 16:53 UTC (permalink / raw)
  To: kd; +Cc: Shuangjun Zhu (r44089), linuxppc-embedded


kd@flaga.is wrote:
> 
> Hi,
> 
> There is an IIC driver now in kernel 2.2.13. I have not tested it yet so I
> can't comment on how well it works.


I put it there as a way to test some of the CPM microcode patches.
It is one of the devices that is relocated, and I was testing on
an Embedded Planet board which has an I2C serial EEPROM.

It works, and is basically the same code that exists in the 
mbxboot directory to read I2C EEPROMs when booting.  There isn't
a write function, but since the read includes a write operation
it shouldn't be too difficult to create one.  It isn't semantically
correct, there is no EOF on read condition (but I am not sure how
to make this happen given the I2C protocol).  The minor device ID
is used for the I2C device address.

The I2C on the 8xx is troublesome, especially because of all of
the silicon errata in early parts.  Later silicon seems to work
fine.

I have only used I2C in master mode.



	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Help about device driver in Linux
  1999-12-28  2:56 Help about device driver in Linux Shuangjun Zhu
@ 1999-12-28 17:35 ` Dan Malek
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Malek @ 1999-12-28 17:35 UTC (permalink / raw)
  To: Shuangjun Zhu (r44089); +Cc: linuxppc-dev, linuxppc-embedded


Shuangjun Zhu wrote:

> I want to make two device driver for MPC823,
> one is for MPC823 Video, one is for MPC IIC.


Both of these exist in the 2.2.13 kernel on ppc.kernel.org.
I regularly use the video driver for LCDs.  It is pretty trivial,
just initializes the 823 and you can mmap() the frame buffer.
There is an ioctl() to set the color map.  I don't know what
to do with it from here, it works well enough for demos and
some custom software I have written.

There are some (relatively) undocumented features to set
aggressive mode display updates, don't mess this up or the
PPC core won't make any progress.  This code works equally
well on the 823 and 823e.  It will not work on the 821.


> Because in the Video driver, it must write configuration
> parameters to the video controller through the IIC driver.

I normally let the application program do this.  We can argue all
day about whether the video driver should have this knowledge, but
it is clearly easier if the application does it.



	-- Dan

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-12-28 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-28  2:56 Help about device driver in Linux Shuangjun Zhu
1999-12-28 17:35 ` Dan Malek
     [not found] <OF9209481E.5CD82FF1-ON00256855.00326F88@flaga.is>
1999-12-28 16:53 ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).