From patchwork Tue May 19 22:01:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1293798 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=idQTJFZp; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49RVGy0VvQz9sT6 for ; Wed, 20 May 2020 08:02:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0C3E181E3E; Wed, 20 May 2020 00:02:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="idQTJFZp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8BB5381E4D; Wed, 20 May 2020 00:01:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0718.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::718]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 75C9E81E2C for ; Wed, 20 May 2020 00:01:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yx5VLqLbH4xO+e1Iria4taxI4IGPmmxqm92EGNg13sShPuylRfwuvDxr+ixVd9LOUkMKvga9p1WdwK4pQ7ggiBL8/sb2dXA3ibmQGEHlnnfbNmro9SESBYA6MYV+3lmo6hPcT0ZoaGfj4fERRIGvWhS+WZ2HJDoLrrikQflZVsEMeHgzgzWXIpXU8vCcn9iRT1AuW+HQBasRJAukAo5G+dqyUhyyHCNzricl7ml32+tMEWdNkmHxU/eWfN7lpMRGH2xtjlH6BHIfgeeOfzkv+SEk2Up/ijzm+Bf6etKQ9jviLPb7OF9IqHPHhQUEEwU5Z4fl0bTe4ltryKAtv6l5xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rVhSOZ59HfgzNakyl7Fk3UNPHZJO2kiVAKgrI/Wmo6c=; b=RgxQJb+CYbvudT7YACI3Yjv4QErl26pjE0OubbSgYoB5vOYl9jXJHCBT5bnEEpdQGDk6u0TX2R6JGXE3QJeAtBXgR/fbgYXYXW+mxVIPhMx3oFWodqZbq/3i5gL2JDi0eIEmTA3CxvMfg2hqFCoLQqlhxLu+kDbIBM9I1eLpPHRYoyFkWPYs34d5J+/jnPUyWNfX1QrmYD8aO0ssYEMCeqWofs7/GNjeetoJN4xJ7ksP7H0U8kVKemaq+I4k78KGUZRIbD38azKPNSv66tXTwj5NhmXiNu2avbjWOe2+W4z8Sl3PLuMuCTOlNC2FLpyHj2yt3b1NdeN4yRZ/ZBE8sw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rVhSOZ59HfgzNakyl7Fk3UNPHZJO2kiVAKgrI/Wmo6c=; b=idQTJFZpd1K6wqmSq8z/XLgSkigPWeQkvacdgvW2r5olbwLylczBHm/Zkqw1Mg5cpZhUHVoMpr4Rf7VkqSDkqbyvwlDQoIrKQgw3E0lPeMYCVi1RsxEMGoS1JNP7G8NlKnJbPBo22gQn/X8xNohg2NocOWH82IGV5eQBp8g+r2k= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; dmarc=none action=none header.from=prevas.dk; Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) by VI1PR10MB2061.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:3a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Tue, 19 May 2020 22:01:29 +0000 Received: from VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa]) by VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM ([fe80::f0ac:4e97:2536:faa%7]) with mapi id 15.20.3000.034; Tue, 19 May 2020 22:01:29 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Simon Glass , Heiko Schocher , Biwen Li , Rasmus Villemoes Subject: [PATCH v2 04/10] rtc: pcf2127: provide ->read method Date: Wed, 20 May 2020 00:01:11 +0200 Message-Id: <20200519220117.24448-5-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200519220117.24448-1-rasmus.villemoes@prevas.dk> References: <20200504212032.3759-1-rasmus.villemoes@prevas.dk> <20200519220117.24448-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: AM5PR04CA0032.eurprd04.prod.outlook.com (2603:10a6:206:1::45) To VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e1::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prevas-ravi.prevas.se (5.186.116.45) by AM5PR04CA0032.eurprd04.prod.outlook.com (2603:10a6:206:1::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26 via Frontend Transport; Tue, 19 May 2020 22:01:28 +0000 X-Mailer: git-send-email 2.23.0 X-Originating-IP: [5.186.116.45] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94c71708-904a-4b59-ec99-08d7fc402ef7 X-MS-TrafficTypeDiagnostic: VI1PR10MB2061: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-Forefront-PRVS: 040866B734 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JLIiv47wnyzKOQJiX82/beKmKbpd1d7kFGauenJ8HOqmNYiQWXnkaOvhGJdritRE2eZ6XaLH8oWnW8BZA21cFFowWL+kHRrMpQvGxVZyco1Iyapei7BlAZ+K+mQ96bGDVta2Fmi17gmJjXife7+OB5dNeNppDzPLYHZ+D2+5JKpZw5DvgrkXrftuTywWJN61m9OOvVg5RZ/MMqiG4S3UfV6oWnH5wsM84a+6G6HDuYWt99BuE9xlB/rOpYd0vusKeEAlL1fZplVSJWHTnyA9vMqaA7yL25b8Yr1YA5/bzIxZoiwjjttYTdiriulC4M3ho6zYHrVB4fa/LfranTAdFDW7OyXXHtTsRhTZO7dNmHRIy2Gg45oopLoht5Ao2jU2R+Zrr4yCebiiE2b7q9YrToAJ8DjYSBuA1F0QJACfu2FbOs4ui9fH4xt6CmtqO6CX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR10MB2765.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(396003)(376002)(366004)(39830400003)(346002)(136003)(6486002)(2906002)(86362001)(186003)(16526019)(26005)(66556008)(2616005)(66946007)(44832011)(66476007)(956004)(1076003)(8976002)(6916009)(6666004)(316002)(5660300002)(107886003)(54906003)(8676002)(6506007)(478600001)(4326008)(36756003)(52116002)(6512007)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 2iq8nqUMBAmXSlDU+6Xkn55JqqhntsIjDihYdpv9MyVtTqYN5gxB2qI5800qz/SLo+lSYUFgMo9y22jJQ4m3cuuvXu8Yfjluumov4EWvtOXcGdQbUkLPHbPXqgxnz1fVTM2G/P6We5Ms2EutPr1k+A5fPEDHoxfShy9qu+l264DUv3phVaick89oXL4OAeUQjCZK6PrblysrLv5+YzRDqHQtfnO0EgOo8T8j4XMftRnwO15oUK5fF/wh9SWBxK79/metpTO5fi069+AHKp6tww27+WybKrP78/LYKlLJ1v6iDpHm3OeHb45oZTMl/JKsIeIHXilxqB3n2Cl6uUQ6ZirgkbAXIWdRJjPdxoWo2TcsxVCCFLRHo67Kf+CyGfC68KwQ11qriAV0a6fwE0MSJFOP6phqEjCvoJi4UEuZpfd2Ps+ZdJd+2KlGELMp6+7wMzTj/b6nekSN2W+RZgggSG1u5NZy8XpPBGqjlxaHK3o= X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 94c71708-904a-4b59-ec99-08d7fc402ef7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2020 22:01:29.5639 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZhU3EuSharkIGhs71ZjqYGYp75TNnwg43NMlNtnmlZ6yxQFcNNXCf2NqsLh90EgwlRisr1vc5PElG8KZM0L6KA9E/avPLCMkVcZX4k3MhLs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB2061 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean This simply consists of renaming the existing pcf2127_read_reg() helper to follow the naming of the other methods (i.e. pcf2127_rtc_) and changing the type of its "len" parameter. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- drivers/rtc/pcf2127.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/pcf2127.c b/drivers/rtc/pcf2127.c index b34ed63bf0..f48cd8cb18 100644 --- a/drivers/rtc/pcf2127.c +++ b/drivers/rtc/pcf2127.c @@ -22,8 +22,7 @@ #define PCF2127_REG_MO 0x08 #define PCF2127_REG_YR 0x09 -static int pcf2127_read_reg(struct udevice *dev, uint offset, - u8 *buffer, int len) +static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8 *buffer, uint len) { struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); struct i2c_msg msg; @@ -72,7 +71,7 @@ static int pcf2127_rtc_get(struct udevice *dev, struct rtc_time *tm) int ret = 0; uchar buf[10] = { PCF2127_REG_CTRL1 }; - ret = pcf2127_read_reg(dev, PCF2127_REG_CTRL1, buf, sizeof(buf)); + ret = pcf2127_rtc_read(dev, PCF2127_REG_CTRL1, buf, sizeof(buf)); if (ret < 0) return ret; @@ -109,6 +108,7 @@ static const struct rtc_ops pcf2127_rtc_ops = { .get = pcf2127_rtc_get, .set = pcf2127_rtc_set, .reset = pcf2127_rtc_reset, + .read = pcf2127_rtc_read, }; static const struct udevice_id pcf2127_rtc_ids[] = {