<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hte, branch v6.7-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>Merge tag 'for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux</title>
<updated>2023-11-01T04:32:51+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-01T04:32:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c52894359395ea0a562b3ed556848ed66fbfff86'/>
<id>c52894359395ea0a562b3ed556848ed66fbfff86</id>
<content type='text'>
Pull hte/timestamp updates from Dipen Patel:

 - Improve comments in the translate function

 - Reflect the GPIOLIB API changes during calculation of the GPIO base

 - Improve error handling in Tegra test and provider drivers

 - Improve code to set the line name

* tag 'for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux:
  hte: Use kasprintf() instead of fixed buffer formatting
  hte: tegra: Fix missing error code in tegra_hte_test_probe()
  hte: tegra194: Switch to LATE_SIMPLE_DEV_PM_OPS()
  hte: tegra194: Remove redundant dev_err()
  hte: tegra194: improve the GPIO-related comment
  hte: allow building modules with COMPILE_TEST enabled
  hte: Annotate struct hte_device with __counted_by
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull hte/timestamp updates from Dipen Patel:

 - Improve comments in the translate function

 - Reflect the GPIOLIB API changes during calculation of the GPIO base

 - Improve error handling in Tegra test and provider drivers

 - Improve code to set the line name

* tag 'for-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux:
  hte: Use kasprintf() instead of fixed buffer formatting
  hte: tegra: Fix missing error code in tegra_hte_test_probe()
  hte: tegra194: Switch to LATE_SIMPLE_DEV_PM_OPS()
  hte: tegra194: Remove redundant dev_err()
  hte: tegra194: improve the GPIO-related comment
  hte: allow building modules with COMPILE_TEST enabled
  hte: Annotate struct hte_device with __counted_by
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: Use kasprintf() instead of fixed buffer formatting</title>
<updated>2023-10-27T21:09:22+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-10-10T14:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc62d5e214df2dd64f5d675f01b609d86a422a2b'/>
<id>fc62d5e214df2dd64f5d675f01b609d86a422a2b</id>
<content type='text'>
Improve readability and maintainability by replacing a hardcoded string
allocation and formatting by the use of the kasprintf() helper.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Improve readability and maintainability by replacing a hardcoded string
allocation and formatting by the use of the kasprintf() helper.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra: Fix missing error code in tegra_hte_test_probe()</title>
<updated>2023-10-27T21:07:15+00:00</updated>
<author>
<name>Harshit Mogalapalli</name>
<email>harshit.m.mogalapalli@oracle.com</email>
</author>
<published>2023-10-26T07:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b7c3ca3553d1de5e86c85636828e186d30cd0628'/>
<id>b7c3ca3553d1de5e86c85636828e186d30cd0628</id>
<content type='text'>
The value of 'ret' is zero when of_hte_req_count() fails to get number
of entitties to timestamp. And returning success(zero) on this failure
path is incorrect.

Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The value of 'ret' is zero when of_hte_req_count() fails to get number
of entitties to timestamp. And returning success(zero) on this failure
path is incorrect.

Fixes: 9a75a7cd03c9 ("hte: Add Tegra HTE test driver")
Signed-off-by: Harshit Mogalapalli &lt;harshit.m.mogalapalli@oracle.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra194: add GPIOLIB dependency</title>
<updated>2023-10-23T18:07:36+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-10-23T18:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9bc633117d6a8411c6912cb0194b3e0f83ef9d56'/>
<id>9bc633117d6a8411c6912cb0194b3e0f83ef9d56</id>
<content type='text'>
The driver started calling into a few interfaces that are part of GPIOLIB and
don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]
  424 |                 line_id = desc-&gt;attr.line_id - gpio_device_get_base(gs-&gt;gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes: dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver started calling into a few interfaces that are part of GPIOLIB and
don't have stub implementations otherwise:

drivers/hte/hte-tegra194.c: In function 'tegra_hte_line_xlate':
drivers/hte/hte-tegra194.c:424:48: error: implicit declaration of function 'gpio_device_get_base'; did you mean 'gpio_device_get_desc'? [-Werror=implicit-function-declaration]
  424 |                 line_id = desc-&gt;attr.line_id - gpio_device_get_base(gs-&gt;gdev);
      |                                                ^~~~~~~~~~~~~~~~~~~~
      |                                                gpio_device_get_desc

Add a Kconfig dependency to only allow building when this is defined.

Fixes: dc850faa28ee0 ("hte: tegra194: don't access struct gpio_chip")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra194: don't access struct gpio_chip</title>
<updated>2023-10-18T07:47:48+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-10-13T07:23:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc850faa28ee0ac18e5e192526cdfa1da0b9d951'/>
<id>dc850faa28ee0ac18e5e192526cdfa1da0b9d951</id>
<content type='text'>
Using struct gpio_chip is not safe as it will disappear if the
underlying driver is unbound for any reason. Switch to using reference
counted struct gpio_device and its dedicated accessors.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
[andy: used gpio_device_find_by_fwnode()]
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using struct gpio_chip is not safe as it will disappear if the
underlying driver is unbound for any reason. Switch to using reference
counted struct gpio_device and its dedicated accessors.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
[andy: used gpio_device_find_by_fwnode()]
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra194: Switch to LATE_SIMPLE_DEV_PM_OPS()</title>
<updated>2023-10-12T16:33:15+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-10-11T20:26:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=091ac92dc79e35ba208b022936dc9f13e0bbad7c'/>
<id>091ac92dc79e35ba208b022936dc9f13e0bbad7c</id>
<content type='text'>
SET_LATE_SYSTEM_SLEEP_PM_OPS is deprecated, replace it with
LATE_SYSTEM_SLEEP_PM_OPS() and use pm_sleep_ptr() for setting
the driver's pm routines. We can now remove the __maybe_unused
qualifier in the suspend and resume functions.

Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SET_LATE_SYSTEM_SLEEP_PM_OPS is deprecated, replace it with
LATE_SYSTEM_SLEEP_PM_OPS() and use pm_sleep_ptr() for setting
the driver's pm routines. We can now remove the __maybe_unused
qualifier in the suspend and resume functions.

Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra194: Remove redundant dev_err()</title>
<updated>2023-10-12T16:32:30+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-10-11T20:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b40f91d43f72d52fb2a3f04c018d703e0477cc3'/>
<id>0b40f91d43f72d52fb2a3f04c018d703e0477cc3</id>
<content type='text'>
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as it is
going to display an appropriate error message in case of a failure.

Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no need to call the dev_err() function directly to print a custom
message when handling an error from platform_get_irq() function as it is
going to display an appropriate error message in case of a failure.

Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: tegra194: improve the GPIO-related comment</title>
<updated>2023-10-05T23:03:20+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-11T09:44:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=06eaa531f2dd1a4d5137a1b49e7c762cc3689b14'/>
<id>06eaa531f2dd1a4d5137a1b49e7c762cc3689b14</id>
<content type='text'>
Using any of the GPIO interfaces using the global numberspace is
deprecated. Make it clear in the comment.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using any of the GPIO interfaces using the global numberspace is
deprecated. Make it clear in the comment.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: allow building modules with COMPILE_TEST enabled</title>
<updated>2023-10-03T20:19:58+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-11T09:46:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=63137bee5a7a45df82d948e39b3b4c07d8b1ce03'/>
<id>63137bee5a7a45df82d948e39b3b4c07d8b1ce03</id>
<content type='text'>
Allow building all HTE modules with COMPILE_TEST Kconfig option enabled.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow building all HTE modules with COMPILE_TEST Kconfig option enabled.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hte: Annotate struct hte_device with __counted_by</title>
<updated>2023-10-03T20:18:39+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-09-22T17:53:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d484366854f535fa25a863a575c5b6a86f4f4bdc'/>
<id>d484366854f535fa25a863a575c5b6a86f4f4bdc</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct hte_device.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Dipen Patel &lt;dipenp@nvidia.com&gt;
Cc: timestamp@lists.linux.dev
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Justin Stitt &lt;justinstitt@google.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct hte_device.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: Dipen Patel &lt;dipenp@nvidia.com&gt;
Cc: timestamp@lists.linux.dev
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Justin Stitt &lt;justinstitt@google.com&gt;
Signed-off-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
