Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8598985ybc; Fri, 29 Nov 2019 13:22:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyBZbDxq8yc3UJ4iulXnj46cijpOPEdZhxDd5sMbaKatd00k6AKFecv80Z2fObMYQd3Kh41 X-Received: by 2002:a05:6402:1694:: with SMTP id a20mr48274048edv.211.1575062560750; Fri, 29 Nov 2019 13:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575062560; cv=none; d=google.com; s=arc-20160816; b=k0y/doVEp8wupJI57xyFs0CrpNwEiirgLtpjWrYoO4xjYA2zqhZSG6Mvv93xvbaOxa 4tMIAarVBaYhBr40We1mVv2fszFZjm37aZIIWXHjTWAxrfSWRydnAU6BXwpWQTA9wWHp awGnfqxybB9JSku/WfA3P3YAZl7rDhGz/O8GQ4SNUwmISDti38nkiwPJCJM1ZegYknJT Xa6YPUEA4FK/DvNATCsQSShX6unsVaeje6FYUWwbkiVIcOiW2nZnjwHmK2jvTHR1UKKh zDsaPL3gCdZDmXwJhhMo2BXxdVAzVQlOfKUXJnsU/7CCjFaH1ywRSIQslzALJ8pBUxYf 0jyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XwKYSe7gQcC1oU2kW2+rZ3DsikC1ppVrWIQm++k4A3k=; b=cjbjcytJYC42DWapfSVs879VOQm4S9hDoCSlMpmDdMPxhTQCY9j9A5ONiSNbYmadtD 1JUWgkuuWWY/UVhCI+VzKxjP/gwbVw7kkeW55RIFtDHpRVgwBuwsVBTv0Ri3LcmAb6fD f31xL5x8eWa96oLJuGiHUGY5nIoWFZ0vNdMiBUOTTi4TX/Bx6J4QK+qoZ2YQv97DQ3+w TwGU+yt+1fnufcswx4GnFZ8NvfsTqwbzXqtpCOLL2V2T1QBpdek4sFKgj2XqMx5LtFU/ 5E/Cnl/qqD0Ik3BZ4yfXMWzQ1A2rk9pTzQGXlbBVkq2azmu+Qv8NmLeYr33QvWVPfcxw w/QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=RJ7hXQMA; 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 n21si5657306ejx.328.2019.11.29.13.22.13; Fri, 29 Nov 2019 13:22:40 -0800 (PST) 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=RJ7hXQMA; 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 S1727142AbfK2VVM (ORCPT + 99 others); Fri, 29 Nov 2019 16:21:12 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:51714 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727073AbfK2VVM (ORCPT ); Fri, 29 Nov 2019 16:21:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=XwKYSe7gQcC1oU2kW2+rZ3DsikC1ppVrWIQm++k4A3k=; b=RJ7hXQMAhDnWk1UYyZdxdEIZNU eJrnAJVwJzFccWe0WqBhOoEWO+/2mqvu1qWfaqw2trU/6ysvrt1MgojB3CrvHo1KXpkqv/dt1Z8W+ /5pvLylhvCXyDfGby3ePBMV/l0RBTEuNyfPZ+kYZSm473rVKzVFnZb2TuX2fHrN896DA=; Received: from p200300ccff0871001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff08:7100:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ianhE-0001xZ-6S; Fri, 29 Nov 2019 22:21:00 +0100 Received: from andi by aktux with local (Exim 4.92) (envelope-from ) id 1ianhD-0004mP-Of; Fri, 29 Nov 2019 22:20:59 +0100 From: Andreas Kemnade To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, a.zummo@towertech.it, alexandre.belloni@bootlin.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, stefan@agner.ch, b.galvani@gmail.com, phh@phh.me, letux-kernel@openphoenux.org Cc: Andreas Kemnade Subject: [PATCH v3 0/6] Add rtc support for rn5t618 mfd Date: Fri, 29 Nov 2019 22:20:39 +0100 Message-Id: <20191129212045.18325-1-andreas@kemnade.info> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Changes in v3: - alignment cleanup - output cleanup, remove useless toggling of alarm flag in rtc probe - updated bindings description, so patch 1/5 becomes 2/6 and so on Changes in v2: - no dead code in irq code - various improvements and cleanups in rtc driver itself Andreas Kemnade (6): dt-bindings: mfd: rn5t618: Document optional property interrupts mfd: rn5t618: prepare for irq handling mfd: rn5t618: add irq support mfd: rn5t618: add rtc related registers mfd: rn5t618: add more subdevices rtc: rtc-rc5t619: add ricoh rc5t619 RTC driver .../devicetree/bindings/mfd/rn5t618.txt | 3 + drivers/mfd/Kconfig | 1 + drivers/mfd/Makefile | 2 + drivers/mfd/{rn5t618.c => rn5t618-core.c} | 52 +- drivers/mfd/rn5t618-irq.c | 85 ++++ drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rc5t619.c | 462 ++++++++++++++++++ include/linux/mfd/rn5t618.h | 27 + 9 files changed, 640 insertions(+), 3 deletions(-) rename drivers/mfd/{rn5t618.c => rn5t618-core.c} (78%) create mode 100644 drivers/mfd/rn5t618-irq.c create mode 100644 drivers/rtc/rtc-rc5t619.c -- 2.20.1