Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3828881ybg; Sun, 20 Oct 2019 22:44:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZ3WR/mU03qhc3l+OoQuGpNos1DY3FIgcdrkiL36SCZBcaSsv3csWBOST2XttbCDXvRlSk X-Received: by 2002:a17:906:792:: with SMTP id l18mr19879524ejc.170.1571636650584; Sun, 20 Oct 2019 22:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571636650; cv=none; d=google.com; s=arc-20160816; b=aehxPNZ+fC7NiA3Zp8bJWleaVLsjxho5Da4js3iFGqhRlhjZtpMw7sAK42Nv5t6UPd rJLbi3pfhrTlY2X3dw8A1ao9NFr0BVJAhZV5qqM3lK5bNpQP5vkkeAsuZFXlPfLEokxg ULUdZce7MtqSlAwxvlNQRJKLM7y++n8vtjuNawXgQxPZXpWRbZiSOpUjd3xMjc94/0fU DzvWTg4mxlLP4w8xPxPcXy0vapAOe7B+eULpXUJh7P4lB7FoZRcPfTwKO593/anUFup2 hA35kgkaqie0j+Nb9q0PD7ubIpdPjaX3XHhofzJf94CKyNLDwTXVyKLyeFQ9Ftqqzxg4 fmdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=QuDqXaB5yMdJbByEJxctBkera7YviQJ4W5OEqeucY5I=; b=wN8quDxYRTuoO8j+zMnFbxeGsslZuhDUMS7Wi1y5W/4gC3P2lxm5fMLCUpPbCJE5Vx OiWXkK86S+mSlaj3DaSWfIaTNOvqr1ajiuTCvXIczDqvE+xHS5acF+gSmvxkLOMWAa2c 65IvdX5ehZxvMLNzJisoS5TbP+PgAOwL4ojNxf8AJEGRbVcn91xvvEO9sxDaQHhUbm/9 Qt1BE9MXR9edwKppOI/igABb8Ooe0QkTxqg07N7fQfQnPkWxsAdhs0Juq00XIw9ix7sp 7HrfQlLjRbecyXNFUUjXYVIAhjB1lhJh95MLBvRXnN5wbt2oBVfD3SRQusamjK6kqNK5 GA6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=g+viyxJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v42si309593edc.378.2019.10.20.22.43.47; Sun, 20 Oct 2019 22:44:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=g+viyxJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbfJUFlX (ORCPT + 99 others); Mon, 21 Oct 2019 01:41:23 -0400 Received: from mail.andi.de1.cc ([85.214.55.253]:38844 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbfJUFlX (ORCPT ); Mon, 21 Oct 2019 01:41:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Message-Id:Date:Subject:Cc:To:From:Sender: Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QuDqXaB5yMdJbByEJxctBkera7YviQJ4W5OEqeucY5I=; b=g+viyxJEG913i16jhf40CEsNG1 vtJMQtibGmrXC5Z3IUnVDBXzx6XpXpBcw0bf51pOb8p7tnwCAligJu8WLTZtVkaP49a01Bj8296Bm fJTmKGG+MjzbJkqp/z27yY+ZbqxrS0uR9dYMSyVWXCQfotyzEEY+3Br6gk6BXs7slboA=; Received: from [77.247.85.102] (helo=localhost) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMQRQ-0002go-Uu; Mon, 21 Oct 2019 07:41:17 +0200 Received: from andi by localhost with local (Exim 4.89) (envelope-from ) id 1iMQRP-0006oe-GK; Mon, 21 Oct 2019 07:41:15 +0200 From: Andreas Kemnade To: lee.jones@linaro.org, a.zummo@towertech.it, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, phh@phh.me, b.galvani@gmail.com, stefan@agner.ch, letux-kernel@openphoenux.org Cc: Andreas Kemnade Subject: [PATCH 0/5] Add rtc support for rn5t618 mfd Date: Mon, 21 Oct 2019 07:40:59 +0200 Message-Id: <20191021054104.26155-1-andreas@kemnade.info> X-Mailer: git-send-email 2.11.0 X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the variant rc5t619 the mfd has a rtc. This patchset adds support for it. To do so it adds the missing register defines in rn5t618.h and general irq handling for that. Probably the irq definitions are the same except missing rtc + charger but due to missing information about that I do not add them. There might be some oddity about the charger irq which should be researched when adding the charger subdevice. The rtc driver itself is based on https://github.com/kobolabs/Kobo-Reader/blob/master/hw/imx6sll-clara/kernel.tar.bz2 but heavily reworked. It was tested on the Kobo Clara HD. Andreas Kemnade (5): mfd: rn5t618: prepare for irq handling mfd: rn5t618: add irq support mfd: rn5t618: add rtc related registers mfd: rn5t618: add more subdevices rtc: rtc-rc5t583: add ricoh rc5t619 RTC driver drivers/mfd/Kconfig | 1 + drivers/mfd/Makefile | 2 + drivers/mfd/{rn5t618.c => rn5t618-core.c} | 49 ++- drivers/mfd/rn5t618-irq.c | 92 ++++++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rc5t619.c | 476 ++++++++++++++++++++++++++++++ include/linux/mfd/rn5t618.h | 29 ++ 8 files changed, 658 insertions(+), 2 deletions(-) rename drivers/mfd/{rn5t618.c => rn5t618-core.c} (79%) create mode 100644 drivers/mfd/rn5t618-irq.c create mode 100644 drivers/rtc/rtc-rc5t619.c -- 2.11.0