Re: [PATCH 1/4] Introduce regmap infrastructure over Maxim/Dalas OneWire (W1) bus

From: Alex A. Mihaylov
Date: Fri May 26 2017 - 12:17:22 EST



Alex, it is up to you to decide whether you want to push your regmap version or not,
I will not object against, but in my personal opinion your first version version was much cleaner.

I don't know. First edition (without regmap) was very simple. I think anyone could understand how this code works.

On the other hand, there is already a lot of duplicate code in the kernel, which is responsible for accessing device registers on the bus. In this sense, using the regmap infrastructure should help. As for the complex description of registers of a simple device, I consciously went into this complication by describing all the holes in the register map. Since this driver is a pioneer, he must use the maximum of infrastructure capabilities.

But I somehow do not really believe in the correctness of the realisation of regmap for W1. I have too few devices working with this bus. Theory, they all can work with my implementation of regmap. But not the fact that there will not be those who can not.