From patchwork Wed Mar 9 00:31:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 86043 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pw0-f56.google.com (mail-pw0-f56.google.com [209.85.160.56]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id EC490B70F9 for ; Wed, 9 Mar 2011 11:31:43 +1100 (EST) Received: by pwj9 with SMTP id 9sf42821pwj.11 for ; Tue, 08 Mar 2011 16:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:date:from:to:cc :subject:message-id:in-reply-to:references:x-mailer:mime-version :x-spam-status:x-spam-checker-version:x-mimedefang-filter :x-scanned-by:x-original-sender:x-original-authentication-results :x-google-group-id:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=pqnEA1qgR7vfPOeh6dXRD+D28iWfoqZOfuJzlPQ4W+w=; b=PK/nzBd8gMcQIjZTcslXinqOThNF4WdJtMYQpdxYjgCJJcmHvIGq1oAaxK+ZEDk7Cl HnirlAOlKuXhSqfSk272rUykg0DuMKaI64MiAjwG4ylb4XgQpDSbThhCFY7Dxdo053C5 dTZuIKGwNim5Z5K1MOL8afdzAjjIBRJsAFejU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:cc:subject:message-id :in-reply-to:references:x-mailer:mime-version:x-spam-status :x-spam-checker-version:x-mimedefang-filter:x-scanned-by :x-original-sender:x-original-authentication-results :x-google-group-id:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; b=XyvsR0Ux8JlB6o8+5aDFyFCWSJhni0EP8vsUk3zUKeYy863ngEIwsMAOCgEDkBdRS1 qdviAlb4vLYeOZ9fdU8qAb/QGYGZPIrxYBCRS74aVpP3PkQxGhsrJVrMN9kXueyK1BoV LDZ+wzmMlUNzVb/2DBNl2B06ApNNhDZFGtOlA= Received: by 10.142.201.1 with SMTP id y1mr437911wff.11.1299630699637; Tue, 08 Mar 2011 16:31:39 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.142.156.18 with SMTP id d18ls3647277wfe.3.p; Tue, 08 Mar 2011 16:31:38 -0800 (PST) Received: by 10.142.223.8 with SMTP id v8mr187569wfg.37.1299630698933; Tue, 08 Mar 2011 16:31:38 -0800 (PST) Received: by 10.142.223.8 with SMTP id v8mr187568wfg.37.1299630698907; Tue, 08 Mar 2011 16:31:38 -0800 (PST) Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by gmr-mx.google.com with ESMTPS id x35si1192695wfd.0.2011.03.08.16.31.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 16:31:38 -0800 (PST) Received-SPF: pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.13 as permitted sender) client-ip=140.211.169.13; Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p290V8Qm022043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Mar 2011 16:31:08 -0800 Received: from akpm.mtv.corp.google.com (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id p290V5TL003767; Tue, 8 Mar 2011 16:31:05 -0800 Date: Tue, 8 Mar 2011 16:31:05 -0800 From: Andrew Morton To: Priyanka Jain Cc: , , , Subject: [rtc-linux] Re: [PATCH] RTC driver(Linux) for PT7C4338 chip. Message-Id: <20110308163105.1a6cb533.akpm@linux-foundation.org> In-Reply-To: <1299039150-21063-1-git-send-email-Priyanka.Jain@freescale.com> References: <1299039150-21063-1-git-send-email-Priyanka.Jain@freescale.com> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Spam-Status: No, hits=-104.984 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED, PATCH_SUBJECT_OSDL, USER_IN_WHITELIST X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 X-Original-Sender: akpm@linux-foundation.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.13 as permitted sender) smtp.mail=akpm@linux-foundation.org X-Google-Group-Id: 712029733259 Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , On Wed, 2 Mar 2011 09:42:30 +0530 Priyanka Jain wrote: > PT7C4338 chip is being manufactured by Pericom Technology Inc. > It is a serial real-time clock which provides: > 1)Low-power clock/calendar. > 2)Programmable square-wave output. > It has 56 bytes of nonvolatile RAM. > > Signed-off-by: Priyanka Jain > --- > PT7C4338 RTC driver is verified on Freescale P1010RDB. > Please pick this patch for 2.6.39 > > drivers/rtc/Kconfig | 9 ++ > drivers/rtc/Makefile | 1 + > drivers/rtc/rtc-pt7c4338.c | 215 ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 225 insertions(+), 0 deletions(-) > create mode 100644 drivers/rtc/rtc-pt7c4338.c > > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig > index 10ba12c..6ff0901 100644 > --- a/drivers/rtc/Kconfig > +++ b/drivers/rtc/Kconfig > @@ -324,6 +324,15 @@ config RTC_DRV_RX8025 > This driver can also be built as a module. If so, the module > will be called rtc-rx8025. > > +config RTC_DRV_PT7C4338 > + tristate "Pericom Technology Inc. PT7C4338 RTC" > + help > + If you say yes here you get support for the Pericom Technology > + Inc. PT7C4338 RTC chip. > + > + This driver can also be built as a module. If so, the module > + will be called rtc-pt7c4338. > + This means that the driver is available on all architectures, not just powerpc. This is a good thing and a bad thing. Bad because it makes non-ppc people possibly build and install a driver which they will never use (correct?). And good because it means that more people do compilation test coverage. Speaking of which: From: Andrew Morton include slab.h, remove unused local drivers/rtc/rtc-pt7c4338.c: In function 'pt7c4338_probe': drivers/rtc/rtc-pt7c4338.c:159: error: implicit declaration of function 'kzalloc' drivers/rtc/rtc-pt7c4338.c:159: warning: assignment makes pointer from integer without a cast drivers/rtc/rtc-pt7c4338.c:176: error: implicit declaration of function 'kfree' drivers/rtc/rtc-pt7c4338.c:156: warning: unused variable 'adapter' Cc: Alessandro Zummo Cc: Benjamin Herrenschmidt Cc: Kumar Gala Cc: Priyanka Jain Signed-off-by: Andrew Morton --- drivers/rtc/rtc-pt7c4338.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/rtc/Kconfig~rtc-driver-for-pt7c4338-chip-fix drivers/rtc/Kconfig diff -puN drivers/rtc/Makefile~rtc-driver-for-pt7c4338-chip-fix drivers/rtc/Makefile diff -puN drivers/rtc/rtc-pt7c4338.c~rtc-driver-for-pt7c4338-chip-fix drivers/rtc/rtc-pt7c4338.c --- a/drivers/rtc/rtc-pt7c4338.c~rtc-driver-for-pt7c4338-chip-fix +++ a/drivers/rtc/rtc-pt7c4338.c @@ -35,6 +35,7 @@ */ #include +#include #include #include #include @@ -153,7 +154,6 @@ static int pt7c4338_probe(struct i2c_cli const struct i2c_device_id *id) { struct pt7c4338 *pt7c4338; - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); int ret; pt7c4338 = kzalloc(sizeof(struct pt7c4338), GFP_KERNEL);