All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sriramakrishnan <srk@ti.com>
To: socketcan-core@lists.berlios.de, netdev@vger.kernel.org
Cc: anantgole@ti.com, Sriramakrishnan <srk@ti.com>
Subject: [PATCH 2/2] can: ti hecc module : add platform specific initialization callback.
Date: Mon, 22 Feb 2010 19:06:02 +0530	[thread overview]
Message-ID: <1266845762-7809-1-git-send-email-srk@ti.com> (raw)

CAN module on AM3517 requires programming of IO expander as part
of init sequence - to enable CAN PHY. Added platform specific
init callback to handle this.

Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Anant Gole <anantgole@ti.com>
---
 drivers/net/can/ti_hecc.c            |    3 +++
 include/linux/can/platform/ti_hecc.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index df27d82..604147e 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -865,6 +865,9 @@ static int ti_hecc_probe(struct platform_device *pdev)
 		goto probe_exit;
 	}
 
+	if (pdata->platform_init)
+		pdata->platform_init();
+
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!mem) {
 		dev_err(&pdev->dev, "No mem resources\n");
diff --git a/include/linux/can/platform/ti_hecc.h b/include/linux/can/platform/ti_hecc.h
index 4688c7b..7036612 100644
--- a/include/linux/can/platform/ti_hecc.h
+++ b/include/linux/can/platform/ti_hecc.h
@@ -35,6 +35,7 @@ struct ti_hecc_platform_data {
 	u32 mbx_offset;
 	u32 int_line;
 	u32 version;
+	void (*platform_init) (void);
 };
 
 
-- 
1.6.2.4


             reply	other threads:[~2010-02-22 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 13:36 Sriramakrishnan [this message]
2010-02-22 16:00 ` [PATCH 2/2] can: ti hecc module : add platform specific initialization callback Marc Kleine-Budde
2010-02-22 23:47 ` David Miller
     [not found]   ` <20100222.154741.56894014.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-02-23 14:34     ` Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1266845762-7809-1-git-send-email-srk@ti.com \
    --to=srk@ti.com \
    --cc=anantgole@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=socketcan-core@lists.berlios.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.