Thread (7 messages) flat view 7 messages, 2 authors, 2021-02-17

Re: [PATCH net-next] misc: Add Renesas Synchronization Management Unit (SMU) support

From: Arnd Bergmann <arnd@kernel.org>
Date: 2021-02-12 19:51:49
Also in: lkml

On Fri, Feb 12, 2021 at 5:19 PM Min Li [off-list ref] wrote:
quoted
Ah, so if this is for a PTP related driver, it should probably be integrated into
the PTP subsystem rather than being a separate class.
I was trying to add these functions to PHC subsystem but was not accepted because the functions
are specific to Renesas device and there is no place for those functions in PHC driver.
It would be useful to explain that in the patch description and link
to the original
discussion there. What exactly was the objection?
quoted
quoted
quoted
This tells me that you got the abstraction the wrong way: the common
files should not need to know anything about the specific
implementations.
quoted
quoted
Instead, these should be in separate modules that call exported
functions from the common code.
I got what you mean. But so far it only supports small set of
functions, which is why I don't feet it is worth the effort to over abstract
things.

Then maybe pick one of the two hardware variants and drop the abstraction
you have. You can then add more features before you add a proper
abstraction layer and then the second driver.
If I come up with a new file and move all the abstraction code there,
does that work?
I think so, but it's more important to figure out a good user space
interface first. The ioctl interfaces should be written on a higher-level
abstraction, to ensure they can work with any hardware implementation
and are not specific to Renesas devices.

Can you describe on an abstract level how a user would use the
character device, and what they achieve by that?

       Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help