Re: [PATCH v4 4/5] regulator: tps65912: Add regulator driver for the TPS65912 PMIC

From: Andrew F. Davis
Date: Mon Oct 26 2015 - 11:48:03 EST


On 10/25/2015 07:43 PM, Mark Brown wrote:
On Sun, Oct 25, 2015 at 03:45:43PM -0500, Andrew F. Davis wrote:
On 10/24/2015 05:14 PM, Mark Brown wrote:

Tbe binding document is buggy and doesn't reflect the code, there's no
compatible string in the driver.

Sure there is:

drivers/mfd/mt6397-core.c:48:
.of_compatible = "mediatek,mt6397-regulator",

This is in the MFD, this is not used in actual systems.


Not sure what you mean by "actual systems", it looks like these
use it?:

arch/arm/boot/dts/mt8135-evbp1.dts
arch/arm64/boot/dts/mediatek/mt8173-evb.dts

Then mfd_add_devices uses this to find the regulator node and fill
in .of_node, then in the regulator driver:

drivers/regulator/mt6397-regulator.c:48:
.of_match = of_match_ptr(match),

which uses your helper to match the nodes in the filled in .of_node.

This is in a regulator definition, it is using the regulator framework
support for parsing DT which must be used by modern drivers. It is not
part of how the Linux driver model device is instantiated, that is done
using the struct platform_driver which is what we are talking about
here.


I understand this, I thought we are talking about compatible strings in
the regulator sub-node, not how the core instantiates the sub-driver.

Please stop this, it is getting very tiresome.


Sorry about that, I'm really not trying to prolong this, but I don't know
what you want. New multifunction devices have compatible strings in their
DT sub-nodes, the framework even helps support this (.of_compatible in
struct mfd_cell), I'm not doing anything new here.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/