Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From 99ccc44129455c49d65097ca1db73dc28055e446 Mon Sep 17 00:00:00 2001
From bc3f60cf8fd787ed4c222323fb9a3aaa20aa129e Mon Sep 17 00:00:00 2001
From: Sugnan Prabhu S <[email protected]>
Date: Wed, 20 Sep 2017 10:54:32 +0530
Subject: [PATCH 1/2] Add ACPI support for MCP251x CAN controller
Subject: [PATCH] Add ACPI support for MCP251x CAN controller

This patch adds ACPI support for mcp251x can controller.

Signed-off-by: Sugnan Prabhu S <[email protected]>
---
drivers/net/can/spi/mcp251x.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
drivers/net/can/spi/mcp251x.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index 575790e..3882e8d 100644
index 575790e..8dd154c 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -54,6 +54,7 @@
Expand All @@ -35,7 +35,7 @@ index 575790e..3882e8d 100644
static int mcp251x_can_probe(struct spi_device *spi)
{
const struct of_device_id *of_id = of_match_device(mcp251x_of_match,
@@ -1032,6 +1039,16 @@ static int mcp251x_can_probe(struct spi_device *spi)
@@ -1032,11 +1039,23 @@ static int mcp251x_can_probe(struct spi_device *spi)
struct mcp251x_priv *priv;
struct clk *clk;
int freq, ret;
Expand All @@ -52,7 +52,14 @@ index 575790e..3882e8d 100644

clk = devm_clk_get(&spi->dev, NULL);
if (IS_ERR(clk)) {
@@ -1069,8 +1086,11 @@ static int mcp251x_can_probe(struct spi_device *spi)
if (pdata)
freq = pdata->oscillator_frequency;
+ else if (has_acpi_companion(&spi->dev) && !device_property_read_u32(&spi->dev, "clock-frequency", &freq))
+ dev_dbg(&spi->dev, "source clock frequency %d", freq);
else
return PTR_ERR(clk);
} else {
@@ -1069,8 +1088,11 @@ static int mcp251x_can_probe(struct spi_device *spi)
CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_LISTENONLY;
if (of_id)
priv->model = (enum mcp251x_model)of_id->data;
Expand All @@ -64,7 +71,7 @@ index 575790e..3882e8d 100644
priv->net = net;
priv->clk = clk;

@@ -1244,6 +1264,7 @@ static struct spi_driver mcp251x_can_driver = {
@@ -1244,6 +1266,7 @@ static struct spi_driver mcp251x_can_driver = {
.driver = {
.name = DEVICE_NAME,
.of_match_table = mcp251x_of_match,
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion recipes-kernel/linux/linux-yocto_4.4.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ SRC_URI += " \
file://0049-drivers-media-ov7251-Enable-set-exposure-and-gain.patch \
file://0050-drivers-media-atomisp-Allow-user-set-exposure-and-ga.patch \
file://0051-Add-ACPI-support-for-MCP251x-CAN-controller.patch \
file://0052-workaround-for-wrong-ACPI-configuration-passed-for-mcp251x.patch \
"

do_install_append() {
Expand Down