[linux-yocto] [yocto-6.6][yocto-6.5][master][PATCH] can: drop obsolete CONFIG_PCH_CAN

2024-01-25 Thread Anuj Mittal
The driver was removed in v6.2.

https://github.com/torvalds/linux/commit/1dd1b521be85417ec409062319520ca26c1c589e

Signed-off-by: Anuj Mittal 
---
 features/can/can.cfg | 2 --
 features/eg20t/eg20t.cfg | 1 -
 2 files changed, 3 deletions(-)

diff --git a/features/can/can.cfg b/features/can/can.cfg
index a15e6061..d50e8109 100644
--- a/features/can/can.cfg
+++ b/features/can/can.cfg
@@ -19,8 +19,6 @@ CONFIG_CAN_GS_USB=m
 CONFIG_CAN_KVASER_USB=m
 CONFIG_CAN_PEAK_USB=m
 CONFIG_CAN_8DEV_USB=m
-# x86 PCH
-#CONFIG_PCH_CAN=m
 # drivers for ISA/PCI cards
 CONFIG_CAN_C_CAN_PCI=m
 # Philips/NXP SJA1000 based PCI(e)
diff --git a/features/eg20t/eg20t.cfg b/features/eg20t/eg20t.cfg
index 8bfff936..9c411acf 100644
--- a/features/eg20t/eg20t.cfg
+++ b/features/eg20t/eg20t.cfg
@@ -30,4 +30,3 @@ CONFIG_GPIO_PCH=y
 
 CONFIG_CAN=y
 CONFIG_CAN_DEV=y
-CONFIG_PCH_CAN=y
-- 
2.43.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13518): 
https://lists.yoctoproject.org/g/linux-yocto/message/13518
Mute This Topic: https://lists.yoctoproject.org/mt/103968281/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [yocto-kernel-cache]: nxp-ls104x: add configs of i2c slave devices for NXP ls1043/ls1046 platform

2024-01-25 Thread Meng Li via lists.yoctoproject.org
From: Limeng 

Hi Bruce,

This patch is used to add configs of i2c slave devices for NXP ls1043/ls1046 
platform.

Could you please help to merge this patch into yocto-kernel-cache, branch is 
only yocto-6.1?

diffstat info as below:

 nxp-ls1043/nxp-ls1043.cfg |5 +
 nxp-ls1046/nxp-ls1046.cfg |5 +
 2 files changed, 10 insertions(+)


thanks,
Limeng

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13519): 
https://lists.yoctoproject.org/g/linux-yocto/message/13519
Mute This Topic: https://lists.yoctoproject.org/mt/103968313/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[linux-yocto] [PATCH] nxp-ls104x: add configs of i2c slave devices for NXP ls1043/ls1046 platform

2024-01-25 Thread Meng Li via lists.yoctoproject.org
Signed-off-by: Meng Li 
---
 bsp/nxp-ls1043/nxp-ls1043.cfg | 5 +
 bsp/nxp-ls1046/nxp-ls1046.cfg | 5 +
 2 files changed, 10 insertions(+)

diff --git a/bsp/nxp-ls1043/nxp-ls1043.cfg b/bsp/nxp-ls1043/nxp-ls1043.cfg
index 376f7244..1f581b9a 100644
--- a/bsp/nxp-ls1043/nxp-ls1043.cfg
+++ b/bsp/nxp-ls1043/nxp-ls1043.cfg
@@ -156,3 +156,8 @@ CONFIG_EDAC_LAYERSCAPE=y
 CONFIG_THERMAL=y
 CONFIG_DEVICE_THERMAL=y
 CONFIG_QORIQ_THERMAL=y
+
+# I2C Slave devices
+CONFIG_EEPROM_AT24=y
+CONFIG_SENSORS_LM90=y
+CONFIG_SENSORS_INA2XX=y
diff --git a/bsp/nxp-ls1046/nxp-ls1046.cfg b/bsp/nxp-ls1046/nxp-ls1046.cfg
index 14a0b14d..5c0f2218 100644
--- a/bsp/nxp-ls1046/nxp-ls1046.cfg
+++ b/bsp/nxp-ls1046/nxp-ls1046.cfg
@@ -153,3 +153,8 @@ CONFIG_EDAC_LAYERSCAPE=y
 CONFIG_THERMAL=y
 CONFIG_DEVICE_THERMAL=y
 CONFIG_QORIQ_THERMAL=y
+
+# I2C Slave devices
+CONFIG_EEPROM_AT24=y
+CONFIG_SENSORS_LM90=y
+CONFIG_SENSORS_INA2XX=y
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13520): 
https://lists.yoctoproject.org/g/linux-yocto/message/13520
Mute This Topic: https://lists.yoctoproject.org/mt/103968315/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [linux-yocto][v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-s32g][PATCH] gpio: fix pinctrl_gpio_get_mux_owner

2024-01-25 Thread quanyang.wang via lists.yoctoproject.org

Hi Bruce,

On 1/24/24 14:38, quanyang.wang via lists.yoctoproject.org wrote:

From: Quanyang Wang

The commit 4ce1995313ecb ("gpio: use pinctrl_gpio_get_mux_owner")
intends to call pinctrl_gpio_get_mux_owner to mark the muxed pin as
"used" and copy "mux_owner" or "gpio_owner" to "info->consumer". So that
when calling gpioinfo at userspace, the "mux_owner" is printed as
"label" in the output of console:

 root@nxp-s32g:~# gpioinfo gpiochip0
 gpiochip0 - 191 lines:
...
 line   5:  "PA_05"   unused   input  active-high
 line   6:  "PA_06" "401d8000.spi" input active-high [used]
 line   7:  "PA_07" "401d8000.spi" input active-high [used]
...

But there are 3 problems with the current implementation:
1. The parameter "gpio" of the function pinctrl_gpio_get_mux_owner
should be "gc->base + info->offset" rather than "info->offset".
2. The member "strict" of s32cc_pmx_ops can be used to mark the flag
GPIO_V2_LINE_FLAG_USED, so there is no need to use the funciton
pinctrl_gpio_get_mux_owner to do that.
3. The function pinctrl_gpio_get_mux_owner takes mutex so it must be
called before taking the spinlock, or else it triggers the following
calltrace:

[ 4640.017246] BUG: sleeping function called from invalid context at 
kernel/locking/rtmutex_api.c:510
[ 4640.017264] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 11395, 
name: gpioinfo
[ 4640.017271] preempt_count: 0, expected: 0
[ 4640.017276] RCU nest depth: 1, expected: 0
[ 4640.017281] INFO: lockdep is turned off.
[ 4640.017290] CPU: 3 PID: 11395 Comm: gpioinfo Tainted: GW  O  
5.15.147-rt72-yocto-preempt-rt #1
[ 4640.017297] Hardware name: Freescale S32G399A (DT)
[ 4640.017302] Call trace:
[ 4640.017304]  dump_backtrace+0x0/0x1c0
[ 4640.017319]  show_stack+0x20/0x30
[ 4640.017325]  dump_stack_lvl+0xb0/0xf4
[ 4640.017335]  dump_stack+0x18/0x34
[ 4640.017342]  __might_resched+0x15c/0x1e0
[ 4640.017351]  __might_sleep+0x50/0xa0
[ 4640.017357]  mutex_lock_nested+0x58/0xe0
[ 4640.017367]  pinctrl_get_device_gpio_range+0x48/0x11c
[ 4640.017378]  pinctrl_gpio_get_mux_owner+0x48/0x110
[ 4640.017386]  gpio_desc_to_lineinfo+0x2a8/0x2dc
[ 4640.017396]  lineinfo_get_v1+0x144/0x260
[ 4640.017405]  gpio_ioctl_unlocked+0xf4/0x3d0
[ 4640.017410]  gpio_ioctl+0x4c/0x74
[ 4640.017415]  __arm64_sys_ioctl+0xb0/0xf4
[ 4640.017424]  invoke_syscall+0x5c/0x130
[ 4640.017437]  el0_svc_common.constprop.0+0x68/0x124
[ 4640.017445]  do_el0_svc+0x4c/0xb0
[ 4640.017452]  el0_svc+0x54/0x110
[ 4640.017458]  el0t_64_sync_handler+0xa4/0x12c
[ 4640.017464]  el0t_64_sync+0x1a0/0x1a4

Signed-off-by: Quanyang Wang
---
Hi Bruce,
Would you please help merge this patch to the branches:
v5.15/standard/preempt-rt/nxp-sdk-5.15/nxp-s32g
v5.15/standard/nxp-sdk-5.15/nxp-s32g


I can't find this patch in v5.15/standard/nxp-sdk-5.15/nxp-s32g, would 
you please help check it?


Thanks,

Quanyang


Thanks,
Quanyang
---
  drivers/gpio/gpiolib-cdev.c| 10 +++---
  drivers/pinctrl/freescale/pinctrl-s32cc-core.c |  1 +
  2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index e3b0d1fbd728a..80e8c32d65e12 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -2021,7 +2021,6 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *desc,
unsigned long flags;
u32 debounce_period_us;
unsigned int num_attrs = 0;
-   int ret;
  
  	memset(info, 0, sizeof(*info));

info->offset = gpio_chip_hwgpio(desc);
@@ -2036,6 +2035,9 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *desc,
ok_for_pinctrl =
pinctrl_gpio_can_use_line(gc->base + info->offset);
  
+	pinctrl_gpio_get_mux_owner(gc->base + info->offset, info->consumer,

+sizeof(info->consumer));
+
spin_lock_irqsave(&gpio_lock, flags);
  
  	if (desc->name)

@@ -2049,12 +2051,6 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *desc,
  
  	if (desc->label)

strscpy(info->consumer, desc->label, sizeof(info->consumer));
-   else {
-   ret = pinctrl_gpio_get_mux_owner(info->offset, info->consumer,
-sizeof(info->consumer));
-   if (!ret)
-   info->flags |= GPIO_V2_LINE_FLAG_USED;
-   }
  
  	if (test_bit(FLAG_REQUESTED, &desc->flags) ||

test_bit(FLAG_IS_HOGGED, &desc->flags) ||
diff --git a/drivers/pinctrl/freescale/pinctrl-s32cc-core.c 
b/drivers/pinctrl/freescale/pinctrl-s32cc-core.c
index e1d0cc817b65a..a711242dc626b 100644
--- a/drivers/pinctrl/freescale/pinctrl-s32cc-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-s32cc-core.c
@@ -553,6 +553,7 @@ static const struct pinmux_ops s32cc_pmx_ops = {
.gpio_request_enable = s32cc_pmx_gpio_request_enable,
.gpio_disable_free = s32cc_pmx_gpio_disable_free,