lkml.org 
[lkml]   [2011]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCHv3 3/4] drivers/otp: convert bfin otp to generic OTP
On Fri, Mar 25, 2011 at 20:11, Jamie Iles wrote:
> or shall I just leave it as one big region for now?

for now, stick with one region. i can refine it later if i desire.

>> > +static const struct otp_region_ops bfin_region_ops = {
>> > +       .read_word      = bfin_region_read_word,
>> > +       .write_word     = bfin_region_write_word,
>> > +       .get_size       = bfin_region_get_size,
>> > +       .get_fmt        = bfin_region_get_fmt,
>> > +       .ioctl          = bfin_region_ioctl,
>> > +};
>>
>> hmm, i just realized this stuff is per-region.  wouldnt the
>> read/write/ioctl make more sense as per-device ?
>
> No, I don't think so.  The file_operations are all based on the regions
> rather than the device so I think it makes sense to have these as region
> based operations.  We could make them per device and pass the region as
> a parameter but I'm not sure that it gains us anything.

for a device that exports more than one region, you dont need to
duplicate the structure. as you add in more regions, the amount of
duplication increases.

how many regions does your device export ? does it need different
read/write behavior for each ?
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-03-26 03:15    [W:0.064 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site