Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "can: tcan4x5x: add option for selecting nWKRQ voltage"

Sean Nyekjaer <sean@geanix.com> says:

This series adds support for setting the nWKRQ voltage.

Link: https://patch.msgid.link/20241114-tcan-wkrqv-v5-0-a2d50833ed71@geanix.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

+29
+8
Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
··· 110 110 Must be half or less of "clocks" frequency. 111 111 maximum: 18000000 112 112 113 + ti,nwkrq-voltage-vio: 114 + type: boolean 115 + description: 116 + nWKRQ Pin GPO buffer voltage configuration. 117 + Set nWKRQ to use VIO voltage rail. 118 + When not set nWKRQ will use internal voltage rail. 119 + 113 120 wakeup-source: 114 121 $ref: /schemas/types.yaml#/definitions/flag 115 122 description: ··· 170 163 device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; 171 164 device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; 172 165 reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>; 166 + ti,nwkrq-voltage-vio; 173 167 wakeup-source; 174 168 }; 175 169 };
+19
drivers/net/can/m_can/tcan4x5x-core.c
··· 92 92 #define TCAN4X5X_MODE_STANDBY BIT(6) 93 93 #define TCAN4X5X_MODE_NORMAL BIT(7) 94 94 95 + #define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19) 96 + 95 97 #define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30)) 96 98 #define TCAN4X5X_DISABLE_INH_MSK BIT(9) 97 99 ··· 269 267 if (ret) 270 268 return ret; 271 269 270 + if (tcan4x5x->nwkrq_voltage_vio) { 271 + ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG, 272 + TCAN4X5X_NWKRQ_VOLTAGE_VIO); 273 + if (ret) 274 + return ret; 275 + } 276 + 272 277 return ret; 273 278 } 274 279 ··· 325 316 } 326 317 327 318 return &tcan4x5x_versions[TCAN4X5X]; 319 + } 320 + 321 + static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev) 322 + { 323 + struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev); 324 + 325 + tcan4x5x->nwkrq_voltage_vio = 326 + of_property_read_bool(cdev->dev->of_node, "ti,nwkrq-voltage-vio"); 328 327 } 329 328 330 329 static int tcan4x5x_get_gpios(struct m_can_classdev *cdev, ··· 469 452 dev_err(&spi->dev, "Getting gpios failed %pe\n", ERR_PTR(ret)); 470 453 goto out_power; 471 454 } 455 + 456 + tcan4x5x_get_dt_data(mcan_class); 472 457 473 458 tcan4x5x_check_wake(priv); 474 459
+2
drivers/net/can/m_can/tcan4x5x.h
··· 42 42 43 43 struct tcan4x5x_map_buf map_buf_rx; 44 44 struct tcan4x5x_map_buf map_buf_tx; 45 + 46 + bool nwkrq_voltage_vio; 45 47 }; 46 48 47 49 static inline void