From patchwork Fri Jan 24 11:06:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharat Bhushan X-Patchwork-Id: 313873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-x239.google.com (mail-pd0-x239.google.com [IPv6:2607:f8b0:400e:c02::239]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AF7EE2C00BB for ; Fri, 24 Jan 2014 22:11:26 +1100 (EST) Received: by mail-pd0-f185.google.com with SMTP id z10sf577638pdj.12 for ; Fri, 24 Jan 2014 03:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=eVSJwcs1JStpBPAAvwhhP560agswdRBz6qt3bPgkvqc=; b=wz/UdA/AKjAhil9hTNX7CCeq8t/KP+GH5REMYQHqCP9ODGsj+OWyVL5qenf5hjNR6n XsQEIf0Nsw2KEM5V7PK/+8nkONuRYCCllzOfUVWYCs+wG8g8KIP2cJ8QAC4acN/Eba9r CEgttgaheKvutJInnngGVNpiaD5Mhf+pGuo0Q58pSOEVHzDY2eWkPCI2iWzaUu1UeYsf 8UncIvBGNua6cr1lkOySNaDPre+yj7Whl8KKtKIVhBXE37JbFmJ4mkEV0smUpo3s4NMU rUwbTZwnxNpJO1WZY69pq8Tn9ON9Rg9JoLBG9gep+MkVmjuu2zFzM2AMlNmB5TA7EkLa KyrQ== X-Received: by 10.140.105.54 with SMTP id b51mr7634qgf.29.1390561882165; Fri, 24 Jan 2014 03:11:22 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.140.89.145 with SMTP id v17ls613181qgd.82.gmail; Fri, 24 Jan 2014 03:11:21 -0800 (PST) X-Received: by 10.59.12.105 with SMTP id ep9mr5306884ved.9.1390561881750; Fri, 24 Jan 2014 03:11:21 -0800 (PST) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe005.messaging.microsoft.com. [65.55.88.15]) by gmr-mx.google.com with ESMTPS id ri8si534870igc.0.2014.01.24.03.11.21 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Jan 2014 03:11:21 -0800 (PST) Received-SPF: neutral (google.com: 65.55.88.15 is neither permitted nor denied by best guess record for domain of Bharat.Bhushan@freescale.com) client-ip=65.55.88.15; Received: from mail72-tx2-R.bigfish.com (10.9.14.251) by TX2EHSOBE010.bigfish.com (10.9.40.30) with Microsoft SMTP Server id 14.1.225.22; Fri, 24 Jan 2014 11:11:20 +0000 Received: from mail72-tx2 (localhost [127.0.0.1]) by mail72-tx2-R.bigfish.com (Postfix) with ESMTP id 8B8BAE0151; Fri, 24 Jan 2014 11:11:20 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VS3(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah1fc6h1082kzdchz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h1155h) Received: from mail72-tx2 (localhost.localdomain [127.0.0.1]) by mail72-tx2 (MessageSwitch) id 1390561878346606_18805; Fri, 24 Jan 2014 11:11:18 +0000 (UTC) Received: from TX2EHSMHS006.bigfish.com (unknown [10.9.14.226]) by mail72-tx2.bigfish.com (Postfix) with ESMTP id 49255A0057; Fri, 24 Jan 2014 11:11:18 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS006.bigfish.com (10.9.99.106) with Microsoft SMTP Server (TLS) id 14.16.227.3; Fri, 24 Jan 2014 11:11:12 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.3.158.2; Fri, 24 Jan 2014 11:11:05 +0000 Received: from freescale.com ([10.232.15.72]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with SMTP id s0OBArhA029290; Fri, 24 Jan 2014 04:10:55 -0700 Received: by freescale.com (sSMTP sendmail emulation); Fri, 24 Jan 2014 16:36:34 +0530 From: Bharat Bhushan To: , , , CC: Bharat Bhushan Subject: [rtc-linux] [PATCH] rtc: ds3232 make it possible to share an irq Date: Fri, 24 Jan 2014 16:36:32 +0530 Message-ID: <1390561592-23968-1-git-send-email-Bharat.Bhushan@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% X-Original-Sender: r65777@freescale.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 65.55.88.15 is neither permitted nor denied by best guess record for domain of Bharat.Bhushan@freescale.com) smtp.mail=Bharat.Bhushan@freescale.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , It's possible to have RTC irq shared with other device (e.g. t4240qds board shares ds3232irq with phy one). Handle this in driver. Signed-off-by: Bharat Bhushan --- drivers/rtc/rtc-ds3232.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index b83bb5a..598837b 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -419,8 +419,8 @@ static int ds3232_probe(struct i2c_client *client, } if (client->irq >= 0) { - ret = devm_request_irq(&client->dev, client->irq, ds3232_irq, 0, - "ds3232", client); + ret = devm_request_irq(&client->dev, client->irq, ds3232_irq, + IRQF_SHARED, "ds3232", client); if (ret) { dev_err(&client->dev, "unable to request IRQ\n"); return ret;