mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
isc_mgr: Enable build of isc_mgr for Linux 6.2
The build of isc_mgr driver was disabled for Linux 6.2 as there is change in API in core kernel. Enable build of isc_mgr driver with appropriate modification in driver for Linux 6.2. Bug 4346767 Change-Id: Ieb7d55d6068d1d893fcc8bfac7aa71c2ba1dece9 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031553 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6fcf226b96
commit
c94946a0bb
@@ -8,7 +8,7 @@ LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
|
|||||||
|
|
||||||
ifneq ($(CONFIG_TEGRA_GPIO_LEGACY_DISABLE),y)
|
ifneq ($(CONFIG_TEGRA_GPIO_LEGACY_DISABLE),y)
|
||||||
obj-m += isc_gpio.o
|
obj-m += isc_gpio.o
|
||||||
obj-m += isc_mgr.o
|
|
||||||
endif
|
endif
|
||||||
|
obj-m += isc_mgr.o
|
||||||
obj-m += isc_dev.o
|
obj-m += isc_dev.o
|
||||||
obj-m += isc_pwm.o
|
obj-m += isc_pwm.o
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/of_gpio.h>
|
#include <linux/of_gpio.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
@@ -815,13 +816,22 @@ static int isc_mgr_of_get_grp_gpio(
|
|||||||
{
|
{
|
||||||
int num, i;
|
int num, i;
|
||||||
|
|
||||||
|
#if defined(NV_OF_GPIO_NAMED_COUNT_PRESENT) /* Linux 6.2 */
|
||||||
num = of_gpio_named_count(np, name);
|
num = of_gpio_named_count(np, name);
|
||||||
|
#else
|
||||||
|
num = of_count_phandle_with_args(np, name, "#gpio-cells");
|
||||||
|
#endif
|
||||||
dev_dbg(dev, " num gpios of %s: %d\n", name, num);
|
dev_dbg(dev, " num gpios of %s: %d\n", name, num);
|
||||||
if (num < 0)
|
if (num < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
for (i = 0; (i < num) && (i < size); i++) {
|
for (i = 0; (i < num) && (i < size); i++) {
|
||||||
|
#if defined(NV_OF_GET_NAMED_GPIO_FLAGS_PRESENT) /* Linux 6.2 */
|
||||||
grp[i] = of_get_named_gpio_flags(np, name, i, &flags[i]);
|
grp[i] = of_get_named_gpio_flags(np, name, i, &flags[i]);
|
||||||
|
#else
|
||||||
|
grp[i] = of_get_named_gpio(np, name, i);
|
||||||
|
flags[i] = 0;
|
||||||
|
#endif
|
||||||
if ((int)grp[i] < 0) {
|
if ((int)grp[i] < 0) {
|
||||||
dev_err(dev, "%s: gpio[%d] invalid\n", __func__, i);
|
dev_err(dev, "%s: gpio[%d] invalid\n", __func__, i);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user