<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/mfd/syscon.h, branch v6.4-rc1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.</title>
<updated>2020-11-19T08:30:11+00:00</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>enric.balletbo@collabora.com</email>
</author>
<published>2020-11-10T16:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=86b9d170da98bae13b307d621638954aef645331'/>
<id>86b9d170da98bae13b307d621638954aef645331</id>
<content type='text'>
This adds syscon_regmap_lookup_by_phandle_optional() function to get an
optional regmap.

It behaves the same as syscon_regmap_lookup_by_phandle() except where
there is no regmap phandle. In this case, instead of returning -ENODEV,
the function returns NULL. This makes error checking simpler when the
regmap phandle is optional.

Suggested-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds syscon_regmap_lookup_by_phandle_optional() function to get an
optional regmap.

It behaves the same as syscon_regmap_lookup_by_phandle() except where
there is no regmap phandle. In this case, instead of returning -ENODEV,
the function returns NULL. This makes error checking simpler when the
regmap phandle is optional.

Suggested-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Signed-off-by: Enric Balletbo i Serra &lt;enric.balletbo@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy</title>
<updated>2020-02-03T08:39:49+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2020-01-30T12:55:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5312f321a67cfee1fe4de245bc558fa857dce33b'/>
<id>5312f321a67cfee1fe4de245bc558fa857dce33b</id>
<content type='text'>
If CONFIG_MFD_SYSCON=n:

    include/linux/mfd/syscon.h:54:23: warning: ‘syscon_regmap_lookup_by_phandle_args’ defined but not used [-Wunused-function]

Fix this by adding the missing inline keyword.

Fixes: 6a24f567af4accef ("mfd: syscon: Add arguments support for syscon reference")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If CONFIG_MFD_SYSCON=n:

    include/linux/mfd/syscon.h:54:23: warning: ‘syscon_regmap_lookup_by_phandle_args’ defined but not used [-Wunused-function]

Fix this by adding the missing inline keyword.

Fixes: 6a24f567af4accef ("mfd: syscon: Add arguments support for syscon reference")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Add arguments support for syscon reference</title>
<updated>2020-01-24T07:33:59+00:00</updated>
<author>
<name>Orson Zhai</name>
<email>orson.zhai@unisoc.com</email>
</author>
<published>2020-01-21T07:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6a24f567af4accef6d73b0be407227c537b94a1f'/>
<id>6a24f567af4accef6d73b0be407227c537b94a1f</id>
<content type='text'>
There are a lot of similar global registers being used across multiple SoCs
from Unisoc. But most of these registers are assigned with different offset
for different SoCs. It is hard to handle all of them in an all-in-one
kernel image.

Add a helper function to get regmap with arguments where we could put some
extra information such as the offset value.

Signed-off-by: Orson Zhai &lt;orson.zhai@unisoc.com&gt;
Tested-by: Baolin Wang &lt;baolin.wang@unisoc.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a lot of similar global registers being used across multiple SoCs
from Unisoc. But most of these registers are assigned with different offset
for different SoCs. It is hard to handle all of them in an all-in-one
kernel image.

Add a helper function to get regmap with arguments where we could put some
extra information such as the offset value.

Signed-off-by: Orson Zhai &lt;orson.zhai@unisoc.com&gt;
Tested-by: Baolin Wang &lt;baolin.wang@unisoc.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd/syscon: Add device_node_to_regmap()</title>
<updated>2019-08-08T22:30:07+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2019-07-24T17:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39233b7c611248c0d05209b4854bc63e26485655'/>
<id>39233b7c611248c0d05209b4854bc63e26485655</id>
<content type='text'>
device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it
does not check that the node is compatible with "syscon", and won't
attach the first clock it finds to the regmap.

The rationale behind this, is that one device node with a standard
compatible string "foo,bar" can be covered by multiple drivers sharing a
regmap, or by a single driver doing all the job without a regmap, but
these are implementation details which shouldn't reflect on the
devicetree.

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Hogan &lt;jhogan@kernel.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Stephen Boyd &lt;sboyd@kernel.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: od@zcrc.me
Cc: Mathieu Malaterre &lt;malat@debian.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it
does not check that the node is compatible with "syscon", and won't
attach the first clock it finds to the regmap.

The rationale behind this, is that one device node with a standard
compatible string "foo,bar" can be covered by multiple drivers sharing a
regmap, or by a single driver doing all the job without a regmap, but
these are implementation details which shouldn't reflect on the
devicetree.

Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Paul Burton &lt;paul.burton@mips.com&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: James Hogan &lt;jhogan@kernel.org&gt;
Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
Cc: Stephen Boyd &lt;sboyd@kernel.org&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: od@zcrc.me
Cc: Mathieu Malaterre &lt;malat@debian.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: Remove unused helper syscon_regmap_lookup_by_pdevname</title>
<updated>2019-06-24T03:22:30+00:00</updated>
<author>
<name>Suzuki K Poulose</name>
<email>suzuki.poulose@arm.com</email>
</author>
<published>2019-06-14T17:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29d14b668d2f2e7b692525ee3f69bf12b06be0f0'/>
<id>29d14b668d2f2e7b692525ee3f69bf12b06be0f0</id>
<content type='text'>
Nobody uses the exported helper syscon_regmap_lookup_by_pdevname,
to lookup a device by name. Let us remove it.

Suggested-by: Arnd Bergman &lt;arnd@arnd.de&gt;
Cc: Arnd Bergman &lt;arnd@arnd.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nobody uses the exported helper syscon_regmap_lookup_by_pdevname,
to lookup a device by name. Let us remove it.

Suggested-by: Arnd Bergman &lt;arnd@arnd.de&gt;
Cc: Arnd Bergman &lt;arnd@arnd.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152</title>
<updated>2019-05-30T18:26:32+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2874c5fd284268364ece81a7bd936f3c8168e567'/>
<id>2874c5fd284268364ece81a7bd936f3c8168e567</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Include errno.h from header</title>
<updated>2016-04-11T12:31:40+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-03-23T10:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=adae28c59a6a71a971ffed713550911546df0e20'/>
<id>adae28c59a6a71a971ffed713550911546df0e20</id>
<content type='text'>
The syscon header uses the ENOTSUPP error constant, but doesn't
include the header that defines it. This causes a build error
after the imx pinctrl driver started using syscon:

include/linux/mfd/syscon.h: In function 'syscon_node_to_regmap':
include/linux/mfd/syscon.h:32:18: error: 'ENOTSUPP' undeclared (first use in this function)
  return ERR_PTR(-ENOTSUPP);
                  ^~~~~~~~

This adds the missing #include.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 8626ada871f1 ("pinctrl: imx: attach iomuxc device to gpr syscon")
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The syscon header uses the ENOTSUPP error constant, but doesn't
include the header that defines it. This causes a build error
after the imx pinctrl driver started using syscon:

include/linux/mfd/syscon.h: In function 'syscon_node_to_regmap':
include/linux/mfd/syscon.h:32:18: error: 'ENOTSUPP' undeclared (first use in this function)
  return ERR_PTR(-ENOTSUPP);
                  ^~~~~~~~

This adds the missing #include.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 8626ada871f1 ("pinctrl: imx: attach iomuxc device to gpr syscon")
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Return ENOTSUPP instead of ENOSYS when disabled</title>
<updated>2016-03-16T08:50:35+00:00</updated>
<author>
<name>Philipp Zabel</name>
<email>p.zabel@pengutronix.de</email>
</author>
<published>2016-01-29T08:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8c037e0c8eaa7dcb3a190b9be841ee81edb865ff'/>
<id>8c037e0c8eaa7dcb3a190b9be841ee81edb865ff</id>
<content type='text'>
When CONFIG_MFD_SYSCON is disabled, have the function stubs return
ENOTSUPP to indicate the syscon functionality is not available.
There are currently no callers that depend on the ENOSYS return value.

This patchfixes a checkpatch warning:
    WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When CONFIG_MFD_SYSCON is disabled, have the function stubs return
ENOTSUPP to indicate the syscon functionality is not available.
There are currently no callers that depend on the ENOSYS return value.

This patchfixes a checkpatch warning:
    WARNING: ENOSYS means 'invalid syscall nr' and nothing else

Signed-off-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Include linux/err.h to fix build error</title>
<updated>2014-06-03T07:11:41+00:00</updated>
<author>
<name>Tushar Behera</name>
<email>tushar.behera@linaro.org</email>
</author>
<published>2014-05-09T11:07:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3d2379909374ef2de6bc57ed8966c7ca8c9dfb82'/>
<id>3d2379909374ef2de6bc57ed8966c7ca8c9dfb82</id>
<content type='text'>
commit df73de9b0d412 ("mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON
is not enabled") introduced fallbacks for APIs, but missed out on adding
the header file. This would work only if linux/err.h is also included
in the source code from where this file is included. It would be better
to include linux/err.h in file to remove possible build errors.

Without this patch, we get following and similar build errors if this
header file is included in some source file and CONFIG_MFD_SYSCON is
not enabled.

include/linux/mfd/syscon.h: In function ‘syscon_node_to_regmap’:
include/linux/mfd/syscon.h:30:2: error: implicit declaration of function ‘ERR_PTR’ [-Werror=implicit-function-declaration]
  return ERR_PTR(-ENOSYS);
  ^
include/linux/mfd/syscon.h:30:18: error: ‘ENOSYS’ undeclared (first use in this function)
  return ERR_PTR(-ENOSYS);
                  ^
Signed-off-by: Tushar Behera &lt;tushar.behera@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit df73de9b0d412 ("mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON
is not enabled") introduced fallbacks for APIs, but missed out on adding
the header file. This would work only if linux/err.h is also included
in the source code from where this file is included. It would be better
to include linux/err.h in file to remove possible build errors.

Without this patch, we get following and similar build errors if this
header file is included in some source file and CONFIG_MFD_SYSCON is
not enabled.

include/linux/mfd/syscon.h: In function ‘syscon_node_to_regmap’:
include/linux/mfd/syscon.h:30:2: error: implicit declaration of function ‘ERR_PTR’ [-Werror=implicit-function-declaration]
  return ERR_PTR(-ENOSYS);
  ^
include/linux/mfd/syscon.h:30:18: error: ‘ENOSYS’ undeclared (first use in this function)
  return ERR_PTR(-ENOSYS);
                  ^
Signed-off-by: Tushar Behera &lt;tushar.behera@linaro.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mfd: syscon: Return -ENOSYS if CONFIG_MFD_SYSCON is not enabled</title>
<updated>2013-10-23T15:22:35+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@freescale.com</email>
</author>
<published>2013-10-22T08:46:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df73de9b0d412915384396637bf67ef9208161e9'/>
<id>df73de9b0d412915384396637bf67ef9208161e9</id>
<content type='text'>
Some platforms may not define CONFIG_MFD_SYSCON (or haven't syscon),
it can fix build error for these platforms.

Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some platforms may not define CONFIG_MFD_SYSCON (or haven't syscon),
it can fix build error for these platforms.

Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
