* [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage
@ 2024-11-14 9:14 Sean Nyekjaer
2024-11-14 9:14 ` [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option Sean Nyekjaer
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Sean Nyekjaer @ 2024-11-14 9:14 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-can, linux-kernel, devicetree, Sean Nyekjaer
This series adds support for setting the nWKRQ voltage.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
Changes in v5:
- Assign bool directly from of_property_read_bool.
- Added Reviewed-By tag to 2/2
- Link to v4: https://lore.kernel.org/r/20241114-tcan-wkrqv-v4-0-f22589d67fb1@geanix.com
Changes in v4:
- Fixed commit msg, as pr. Marc's comments
- Added Reviewed-By tag to 2/2
- Link to v3: https://lore.kernel.org/r/20241112-tcan-wkrqv-v3-0-c66423fba26d@geanix.com
Changes in v3:
- Switched the order of patches, yaml patch first and then code change.
- Switched to a boolean ti,nwkrq-voltage-vio.
- Switched internal variable to a bool.
- Link to v2: https://lore.kernel.org/r/20241111-tcan-wkrqv-v2-0-9763519b5252@geanix.com
Changes in v2:
- Converted tcan4x5x.txt to DT schema. In
https://lore.kernel.org/linux-can/20241105-convert-tcan-v2-1-4b320f3fcf99@geanix.com/
- Reworked ti,nwkrq-voltage-sel, to DH schema style.
- Link to v1: https://lore.kernel.org/r/20241031-tcan-wkrqv-v1-0-823dbd12fe4a@geanix.com
---
Sean Nyekjaer (2):
dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option
can: tcan4x5x: add option for selecting nWKRQ voltage
.../devicetree/bindings/net/can/ti,tcan4x5x.yaml | 8 ++++++++
drivers/net/can/m_can/tcan4x5x-core.c | 20 ++++++++++++++++++++
drivers/net/can/m_can/tcan4x5x.h | 2 ++
3 files changed, 30 insertions(+)
---
base-commit: 2b2a9a08f8f0b904ea2bc61db3374421b0f944a6
change-id: 20241030-tcan-wkrqv-c62b906005da
prerequisite-change-id: 20241105-convert-tcan-4b516424ecf6:v2
prerequisite-patch-id: a652b1a16dadd5ff525d0b58fec56f605a976aa3
Best regards,
--
Sean Nyekjaer <sean@geanix.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option
2024-11-14 9:14 [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
@ 2024-11-14 9:14 ` Sean Nyekjaer
2024-11-15 17:37 ` Rob Herring (Arm)
2024-11-14 9:14 ` [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
2024-11-18 8:55 ` [PATCH can-next v5 0/2] " Marc Kleine-Budde
2 siblings, 1 reply; 8+ messages in thread
From: Sean Nyekjaer @ 2024-11-14 9:14 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-can, linux-kernel, devicetree, Sean Nyekjaer
The nWKRQ pin supports an output voltage of either the internal reference
voltage (3.6V) or the reference voltage of
the digital interface 0-6V (VIO).
Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
If this property is omitted the reset default, the internal reference
voltage, is used.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
---
Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml b/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
index f1d18a5461e05296998ae9bf09bdfa1226580131..ff18cf7393550d1b7107b1233d8302203026579d 100644
--- a/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
+++ b/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
@@ -106,6 +106,13 @@ properties:
Must be half or less of "clocks" frequency.
maximum: 18000000
+ ti,nwkrq-voltage-vio:
+ type: boolean
+ description:
+ nWKRQ Pin GPO buffer voltage configuration.
+ Set nWKRQ to use VIO voltage rail.
+ When not set nWKRQ will use internal voltage rail.
+
wakeup-source:
$ref: /schemas/types.yaml#/definitions/flag
description:
@@ -157,6 +164,7 @@ examples:
device-state-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
device-wake-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+ ti,nwkrq-voltage-vio;
wakeup-source;
};
};
--
2.46.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage
2024-11-14 9:14 [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
2024-11-14 9:14 ` [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option Sean Nyekjaer
@ 2024-11-14 9:14 ` Sean Nyekjaer
2024-11-18 15:05 ` Sean Nyekjaer
2024-11-18 8:55 ` [PATCH can-next v5 0/2] " Marc Kleine-Budde
2 siblings, 1 reply; 8+ messages in thread
From: Sean Nyekjaer @ 2024-11-14 9:14 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-can, linux-kernel, devicetree, Sean Nyekjaer
The nWKRQ pin supports an output voltage of either the internal reference
voltage (3.6V) or the reference voltage of
the digital interface 0-6V (VIO).
Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
If this property is omitted the reset default, the internal reference
voltage, is used.
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
---
drivers/net/can/m_can/tcan4x5x-core.c | 20 ++++++++++++++++++++
drivers/net/can/m_can/tcan4x5x.h | 2 ++
2 files changed, 22 insertions(+)
diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c
index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..7213d9894c82d079bf92f1ec62d4eebb500cdfa4 100644
--- a/drivers/net/can/m_can/tcan4x5x-core.c
+++ b/drivers/net/can/m_can/tcan4x5x-core.c
@@ -92,6 +92,8 @@
#define TCAN4X5X_MODE_STANDBY BIT(6)
#define TCAN4X5X_MODE_NORMAL BIT(7)
+#define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19)
+
#define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30))
#define TCAN4X5X_DISABLE_INH_MSK BIT(9)
@@ -267,6 +269,13 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
if (ret)
return ret;
+ if (tcan4x5x->nwkrq_voltage_vio) {
+ ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
+ TCAN4X5X_NWKRQ_VOLTAGE_VIO);
+ if (ret)
+ return ret;
+ }
+
return ret;
}
@@ -318,6 +327,15 @@ static const struct tcan4x5x_version_info
return &tcan4x5x_versions[TCAN4X5X];
}
+static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev)
+{
+ struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
+ struct device_node *np = cdev->dev->of_node;
+
+ tcan4x5x->nwkrq_voltage_vio =
+ of_property_read_bool(cdev->dev->of_node, "ti,nwkrq-voltage-vio");
+}
+
static int tcan4x5x_get_gpios(struct m_can_classdev *cdev,
const struct tcan4x5x_version_info *version_info)
{
@@ -453,6 +471,8 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
goto out_power;
}
+ tcan4x5x_get_dt_data(mcan_class);
+
tcan4x5x_check_wake(priv);
ret = tcan4x5x_write_tcan_reg(mcan_class, TCAN4X5X_INT_EN, 0);
diff --git a/drivers/net/can/m_can/tcan4x5x.h b/drivers/net/can/m_can/tcan4x5x.h
index e62c030d3e1e5a713c997e7c8ecad4a44aff4e6a..203399d5e8ccf3fd7a26b54d8356fca9d398524c 100644
--- a/drivers/net/can/m_can/tcan4x5x.h
+++ b/drivers/net/can/m_can/tcan4x5x.h
@@ -42,6 +42,8 @@ struct tcan4x5x_priv {
struct tcan4x5x_map_buf map_buf_rx;
struct tcan4x5x_map_buf map_buf_tx;
+
+ bool nwkrq_voltage_vio;
};
static inline void
--
2.46.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option
2024-11-14 9:14 ` [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option Sean Nyekjaer
@ 2024-11-15 17:37 ` Rob Herring (Arm)
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring (Arm) @ 2024-11-15 17:37 UTC (permalink / raw)
To: Sean Nyekjaer
Cc: Conor Dooley, Jakub Kicinski, linux-kernel, David S. Miller,
Vincent Mailhol, linux-can, Marc Kleine-Budde, Paolo Abeni,
Krzysztof Kozlowski, Eric Dumazet, devicetree
On Thu, 14 Nov 2024 10:14:49 +0100, Sean Nyekjaer wrote:
> The nWKRQ pin supports an output voltage of either the internal reference
> voltage (3.6V) or the reference voltage of
> the digital interface 0-6V (VIO).
> Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
>
> If this property is omitted the reset default, the internal reference
> voltage, is used.
>
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> ---
> Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage
2024-11-14 9:14 [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
2024-11-14 9:14 ` [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option Sean Nyekjaer
2024-11-14 9:14 ` [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
@ 2024-11-18 8:55 ` Marc Kleine-Budde
2 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2024-11-18 8:55 UTC (permalink / raw)
To: Sean Nyekjaer
Cc: Vincent Mailhol, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-can, linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
On 14.11.2024 10:14:48, Sean Nyekjaer wrote:
> This series adds support for setting the nWKRQ voltage.
>
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Applied to linux-can-next.
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage
2024-11-14 9:14 ` [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
@ 2024-11-18 15:05 ` Sean Nyekjaer
2024-11-18 15:14 ` Marc Kleine-Budde
0 siblings, 1 reply; 8+ messages in thread
From: Sean Nyekjaer @ 2024-11-18 15:05 UTC (permalink / raw)
To: Marc Kleine-Budde, Vincent Mailhol, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-can, linux-kernel, devicetree
Hi Marc,
On Thu, Nov 14, 2024 at 10:14:50AM +0100, Sean Nyekjaer wrote:
> The nWKRQ pin supports an output voltage of either the internal reference
> voltage (3.6V) or the reference voltage of
> the digital interface 0-6V (VIO).
> Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
>
> If this property is omitted the reset default, the internal reference
> voltage, is used.
>
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> ---
> drivers/net/can/m_can/tcan4x5x-core.c | 20 ++++++++++++++++++++
> drivers/net/can/m_can/tcan4x5x.h | 2 ++
> 2 files changed, 22 insertions(+)
>
> diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c
> index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..7213d9894c82d079bf92f1ec62d4eebb500cdfa4 100644
> --- a/drivers/net/can/m_can/tcan4x5x-core.c
> +++ b/drivers/net/can/m_can/tcan4x5x-core.c
> @@ -92,6 +92,8 @@
> #define TCAN4X5X_MODE_STANDBY BIT(6)
> #define TCAN4X5X_MODE_NORMAL BIT(7)
>
> +#define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19)
> +
> #define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30))
> #define TCAN4X5X_DISABLE_INH_MSK BIT(9)
>
> @@ -267,6 +269,13 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
> if (ret)
> return ret;
>
> + if (tcan4x5x->nwkrq_voltage_vio) {
> + ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
> + TCAN4X5X_NWKRQ_VOLTAGE_VIO);
> + if (ret)
> + return ret;
> + }
> +
> return ret;
> }
>
> @@ -318,6 +327,15 @@ static const struct tcan4x5x_version_info
> return &tcan4x5x_versions[TCAN4X5X];
> }
>
> +static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev)
> +{
> + struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
> + struct device_node *np = cdev->dev->of_node;
Guess we can remove this line. Sorry
> +
> + tcan4x5x->nwkrq_voltage_vio =
> + of_property_read_bool(cdev->dev->of_node, "ti,nwkrq-voltage-vio");
> +}
> +
> static int tcan4x5x_get_gpios(struct m_can_classdev *cdev,
> const struct tcan4x5x_version_info *version_info)
> {
> @@ -453,6 +471,8 @@ static int tcan4x5x_can_probe(struct spi_device *spi)
> goto out_power;
> }
>
> + tcan4x5x_get_dt_data(mcan_class);
> +
> tcan4x5x_check_wake(priv);
>
> ret = tcan4x5x_write_tcan_reg(mcan_class, TCAN4X5X_INT_EN, 0);
> diff --git a/drivers/net/can/m_can/tcan4x5x.h b/drivers/net/can/m_can/tcan4x5x.h
> index e62c030d3e1e5a713c997e7c8ecad4a44aff4e6a..203399d5e8ccf3fd7a26b54d8356fca9d398524c 100644
> --- a/drivers/net/can/m_can/tcan4x5x.h
> +++ b/drivers/net/can/m_can/tcan4x5x.h
> @@ -42,6 +42,8 @@ struct tcan4x5x_priv {
>
> struct tcan4x5x_map_buf map_buf_rx;
> struct tcan4x5x_map_buf map_buf_tx;
> +
> + bool nwkrq_voltage_vio;
> };
>
> static inline void
>
> --
> 2.46.2
>
/Sean
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage
2024-11-18 15:05 ` Sean Nyekjaer
@ 2024-11-18 15:14 ` Marc Kleine-Budde
2025-01-03 12:32 ` Sean Nyekjaer
0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2024-11-18 15:14 UTC (permalink / raw)
To: Sean Nyekjaer
Cc: Vincent Mailhol, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-can, linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
On 18.11.2024 16:05:42, Sean Nyekjaer wrote:
> Hi Marc,
>
> On Thu, Nov 14, 2024 at 10:14:50AM +0100, Sean Nyekjaer wrote:
> > The nWKRQ pin supports an output voltage of either the internal reference
> > voltage (3.6V) or the reference voltage of
> > the digital interface 0-6V (VIO).
> > Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
> >
> > If this property is omitted the reset default, the internal reference
> > voltage, is used.
> >
> > Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> > Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> > ---
> > drivers/net/can/m_can/tcan4x5x-core.c | 20 ++++++++++++++++++++
> > drivers/net/can/m_can/tcan4x5x.h | 2 ++
> > 2 files changed, 22 insertions(+)
> >
> > diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c
> > index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..7213d9894c82d079bf92f1ec62d4eebb500cdfa4 100644
> > --- a/drivers/net/can/m_can/tcan4x5x-core.c
> > +++ b/drivers/net/can/m_can/tcan4x5x-core.c
> > @@ -92,6 +92,8 @@
> > #define TCAN4X5X_MODE_STANDBY BIT(6)
> > #define TCAN4X5X_MODE_NORMAL BIT(7)
> >
> > +#define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19)
> > +
> > #define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30))
> > #define TCAN4X5X_DISABLE_INH_MSK BIT(9)
> >
> > @@ -267,6 +269,13 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
> > if (ret)
> > return ret;
> >
> > + if (tcan4x5x->nwkrq_voltage_vio) {
> > + ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
> > + TCAN4X5X_NWKRQ_VOLTAGE_VIO);
> > + if (ret)
> > + return ret;
> > + }
> > +
> > return ret;
> > }
> >
> > @@ -318,6 +327,15 @@ static const struct tcan4x5x_version_info
> > return &tcan4x5x_versions[TCAN4X5X];
> > }
> >
> > +static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev)
> > +{
> > + struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
> > + struct device_node *np = cdev->dev->of_node;
>
> Guess we can remove this line. Sorry
ACK. Will fixup here.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage
2024-11-18 15:14 ` Marc Kleine-Budde
@ 2025-01-03 12:32 ` Sean Nyekjaer
0 siblings, 0 replies; 8+ messages in thread
From: Sean Nyekjaer @ 2025-01-03 12:32 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Vincent Mailhol, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-can, linux-kernel, devicetree
On Mon, Nov 18, 2024 at 04:14:09PM +0100, Marc Kleine-Budde wrote:
> On 18.11.2024 16:05:42, Sean Nyekjaer wrote:
> > Hi Marc,
> >
> > On Thu, Nov 14, 2024 at 10:14:50AM +0100, Sean Nyekjaer wrote:
> > > The nWKRQ pin supports an output voltage of either the internal reference
> > > voltage (3.6V) or the reference voltage of
> > > the digital interface 0-6V (VIO).
> > > Add the devicetree option ti,nwkrq-voltage-vio to set it to VIO.
> > >
> > > If this property is omitted the reset default, the internal reference
> > > voltage, is used.
> > >
> > > Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> > > Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > > Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
> > > ---
> > > drivers/net/can/m_can/tcan4x5x-core.c | 20 ++++++++++++++++++++
> > > drivers/net/can/m_can/tcan4x5x.h | 2 ++
> > > 2 files changed, 22 insertions(+)
> > >
> > > diff --git a/drivers/net/can/m_can/tcan4x5x-core.c b/drivers/net/can/m_can/tcan4x5x-core.c
> > > index 2f73bf3abad889c222f15c39a3d43de1a1cf5fbb..7213d9894c82d079bf92f1ec62d4eebb500cdfa4 100644
> > > --- a/drivers/net/can/m_can/tcan4x5x-core.c
> > > +++ b/drivers/net/can/m_can/tcan4x5x-core.c
> > > @@ -92,6 +92,8 @@
> > > #define TCAN4X5X_MODE_STANDBY BIT(6)
> > > #define TCAN4X5X_MODE_NORMAL BIT(7)
> > >
> > > +#define TCAN4X5X_NWKRQ_VOLTAGE_VIO BIT(19)
> > > +
> > > #define TCAN4X5X_DISABLE_WAKE_MSK (BIT(31) | BIT(30))
> > > #define TCAN4X5X_DISABLE_INH_MSK BIT(9)
> > >
> > > @@ -267,6 +269,13 @@ static int tcan4x5x_init(struct m_can_classdev *cdev)
> > > if (ret)
> > > return ret;
> > >
> > > + if (tcan4x5x->nwkrq_voltage_vio) {
> > > + ret = regmap_set_bits(tcan4x5x->regmap, TCAN4X5X_CONFIG,
> > > + TCAN4X5X_NWKRQ_VOLTAGE_VIO);
> > > + if (ret)
> > > + return ret;
> > > + }
> > > +
> > > return ret;
> > > }
> > >
> > > @@ -318,6 +327,15 @@ static const struct tcan4x5x_version_info
> > > return &tcan4x5x_versions[TCAN4X5X];
> > > }
> > >
> > > +static void tcan4x5x_get_dt_data(struct m_can_classdev *cdev)
> > > +{
> > > + struct tcan4x5x_priv *tcan4x5x = cdev_to_priv(cdev);
> > > + struct device_node *np = cdev->dev->of_node;
> >
> > Guess we can remove this line. Sorry
>
> ACK. Will fixup here.
Remenber to do the fixup :)
Sorry for the extra work
/Sean
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-01-03 12:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 9:14 [PATCH can-next v5 0/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
2024-11-14 9:14 ` [PATCH can-next v5 1/2] dt-bindings: can: tcan4x5x: Document the ti,nwkrq-voltage-vio option Sean Nyekjaer
2024-11-15 17:37 ` Rob Herring (Arm)
2024-11-14 9:14 ` [PATCH can-next v5 2/2] can: tcan4x5x: add option for selecting nWKRQ voltage Sean Nyekjaer
2024-11-18 15:05 ` Sean Nyekjaer
2024-11-18 15:14 ` Marc Kleine-Budde
2025-01-03 12:32 ` Sean Nyekjaer
2024-11-18 8:55 ` [PATCH can-next v5 0/2] " Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox