lkml.org 
[lkml]   [2019]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: fieldbus: anybuss: force address space conversion
On Tue, May 21, 2019 at 12:24 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> what is so odd about this code that makes you have to jump through
> strange hoops that no other driver has to?
>

Basically because it creates a regmap which accesses __iomem memory,
instead of i2c/spi.

This was done because future hardware in the company's pipeline will access
device register space through spi, instead of through a parallel memory bus.

The lower driver just has to create the appropriate regmap, __iomem or
spi, and pass it to the
upper driver, which does not have to know about the exact way the h/w
gets accessed.
So regmap is used as a hw abstraction layer.

The issue here is that a regmap context is a 'void *' yet the parallel
memory base pointer
is 'void __iomem *'. And so the two are incompatible.

\
 
 \ /
  Last update: 2019-05-21 18:54    [W:0.037 / U:2.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site