From patchwork Mon Feb 22 13:36:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram X-Patchwork-Id: 45961 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BB419B7CB6 for ; Tue, 23 Feb 2010 00:36:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823Ab0BVNgL (ORCPT ); Mon, 22 Feb 2010 08:36:11 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:35410 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185Ab0BVNgK (ORCPT ); Mon, 22 Feb 2010 08:36:10 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1MDa42l019040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Feb 2010 07:36:06 -0600 Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o1MDa2VV000706; Mon, 22 Feb 2010 19:06:03 +0530 (IST) Received: from psplinux051.india.ti.com (localhost [127.0.0.1]) by psplinux051.india.ti.com (8.13.1/8.13.1) with ESMTP id o1MDa2ZA007841; Mon, 22 Feb 2010 19:06:02 +0530 Received: (from a0875517@localhost) by psplinux051.india.ti.com (8.13.1/8.13.1/Submit) id o1MDa2mP007838; Mon, 22 Feb 2010 19:06:02 +0530 From: Sriramakrishnan To: socketcan-core@lists.berlios.de, netdev@vger.kernel.org Cc: anantgole@ti.com, Sriramakrishnan Subject: [PATCH 2/2] can: ti hecc module : add platform specific initialization callback. Date: Mon, 22 Feb 2010 19:06:02 +0530 Message-Id: <1266845762-7809-1-git-send-email-srk@ti.com> X-Mailer: git-send-email 1.6.2.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Acked-by: Anant Gole --- 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); };