acceptable chip driver limitations

Abraham vd Merwe abraham at 2d3d.co.za
Tue Jun 5 04:57:29 EDT 2001


Hi David!

> >  Is it allright if my chip driver read/write's only accept 32-bit to/
> > from/len's?
> 
> > I.e. if I return with -EINVAL if somebody tries to read/write a single
> > byte or tries to read from a non-dword boundary, is that acceptable or
> > should the driver cater for word/byte read/writes as well?
> 
> Leave them NULL. You can't return an error value from them - there's no 
> possible value you can return that isn't a valid return from an actual read.
> 
> They should never get called is the buswidth doesn't match them.

No, I'm talking about mtd->read() and mtd->write. Surely they can return
errors? If not, what about physical write/read errors?

-- 

Regards
 Abraham

Visit beautiful Vergas, Minnesota.

__________________________________________________________
 Abraham vd Merwe - 2d3D, Inc.

 Device Driver Development, Outsourcing, Embedded Systems

  Cell: +27 82 565 4451         Snailmail:
   Tel: +27 21 761 7549            Block C, Antree Park
   Fax: +27 21 761 7648            Doncaster Road
 Email: abraham at 2d3d.co.za         Kenilworth, 7700
  Http: http://www.2d3d.com        South Africa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20010605/fad14618/attachment.bin 


More information about the linux-mtd mailing list