i2c/of: Add OF_RECONFIG notifier handler
authorPantelis Antoniou <pantelis.antoniou@konsulko.com>
Tue, 28 Oct 2014 20:36:03 +0000 (22:36 +0200)
committerMark Brown <broonie@kernel.org>
Sat, 21 Feb 2015 03:13:53 +0000 (12:13 +0900)
commit9f2de29f83de83f8ea7c7ce5f9afbecadd72b507
tree11abb420e8126eeea0a83f5e1996348d72727dbf
parent4edb763a4caa7df6f60d132674c276bcf9135d72
i2c/of: Add OF_RECONFIG notifier handler

CONFIG_OF_DYNAMIC enables runtime changes to the device tree which in
turn may trigger addition or removal of devices from Linux. Add an
OF_RECONFIG notifier handler to receive tree change events and to
creating or destroy i2c devices as required.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
[grant.likely: clean up #ifdefs and drop unneeded error handling]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-i2c@vger.kernel.org
(cherry picked from commit ea7513bbc04170f1cbf42953187a4d8b731c71c4)
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/i2c/i2c-core.c