Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1417006ybf; Thu, 27 Feb 2020 10:33:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyEm8paqFHpCYVAUavPCzFwAzAR3dbTfLTXwxQNoBd9nt+aPn2q3c13MQXraEUb0f5zLusq X-Received: by 2002:a05:6830:100e:: with SMTP id a14mr176793otp.297.1582828398241; Thu, 27 Feb 2020 10:33:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582828398; cv=none; d=google.com; s=arc-20160816; b=06HbeOsRJe4hUvjWfshZQ0P/ihUFVme4tvceoTPX54onArWO5JKOhKLgKKI19u/mFJ /DtnJr9LHdbErHhBgjgVozxXQbGAY0xQUMizR0VCrYH1iH6WglvhWGbsQePi8WMjy3qv WG4MMSy4EVNWJlKtco2BSNFXnZXOjtQWXoeyxIzK8ib41LHT6XT9tEkwkIn35rCrBM3N 3Za5C9K+wFaq944+GcPQDdp4AmYC8oNwMDCfuAmJgiUDko+TPlsjnIwt4TWhWqAgIPaV 3Gc6H3gHdADXw88bc6EWVRzGlMJa/O9shscMrp+8rbr0EyoNPvk8x6/pM/yBBj25POI8 z+8Q== 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=yQkfOLNuqw0s/C4iIr73jm/g+t03fJKekg1eS9M/yZg=; b=t4iqmoVUG1KypcMWNtLqn0Wfyi0lI+c6inzY3wXYQMoOFxl7aMmqCZYIApW1ensFab QpDIOMHh+DKG7akDSmbKtyI6n9XmV67WxVFeiM2+NVTRYOZYi7YeGM+NgUa6viajnmo8 7RkdGN3CSqJnAGfjA3Re9hrd3F5jVB27Cns+2txl1gbbxLq+EH5ncx+owkF+cBEX1XNt pjdnKk5M2sNONy7ydgB/rFFkPd3QqtAXyHNggUQRs5YOcT0jZ3Tj5SI6O3gtZCuzTh+k qMmsfRX9kvf69pCwIEtGx4dspeIbkkDM52y652CtYfjZWvVhd453qPGAGWLoGjjiELwU iUJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=M4ms9jty; 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 m11si327996oim.223.2020.02.27.10.33.05; Thu, 27 Feb 2020 10:33:18 -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=M4ms9jty; 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 S1730677AbgB0Sbr (ORCPT + 99 others); Thu, 27 Feb 2020 13:31:47 -0500 Received: from mail.andi.de1.cc ([85.214.55.253]:51280 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729580AbgB0Sbp (ORCPT ); Thu, 27 Feb 2020 13:31:45 -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=yQkfOLNuqw0s/C4iIr73jm/g+t03fJKekg1eS9M/yZg=; b=M4ms9jty0MbPPPh6W6xA8Nd0NJ psoAwSI57Rqlb3yCjZaXgUWWjaL+EvmG9cAC+S8dL6WegGFydhncHyitGhusrelfjv4+oKdbJH2EJ 3VREg3rcOCg67Bdfi0jbA4nHyKNyOr9nAYmQ9C/SwZh5Czv0gwdkSeqNVD2ii5amwDBU=; Received: from p200300ccff13fd00e2cec3fffe93fc31.dip0.t-ipconnect.de ([2003:cc:ff13:fd00:e2ce:c3ff:fe93:fc31] helo=eeepc) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1j7NwX-0006yB-Kh; Thu, 27 Feb 2020 19:31:29 +0100 Received: from andi by eeepc with local (Exim 4.92) (envelope-from ) id 1j7NwW-0003oO-WB; Thu, 27 Feb 2020 19:31:29 +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, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, jic23@kernel.org Cc: Andreas Kemnade Subject: [PATCH v6 0/7] mfd: rn5t618: Add RTC/ADC support Date: Thu, 27 Feb 2020 19:31:05 +0100 Message-Id: <20200227183112.14512-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 an 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. It seems that the IRQ definitions are the same except missing RTC for the RN5T618 but due to missing ability to test that they are not added here. It also adds support for the ADC, it is available in both the RN5T618 and RC5T619 but due to missing ability to test that, the subdevice is only added for the RN5T618. It was tested on the Kobo Clara HD. Changes in v6: - put together with ADC series - also added cleanup i2_device_id patch to avoid merge conflicts Changes in v5: - static rn5t618_irq_init - PLATFORM_DEVID_NONE - added some Acked-Bys Changes in v4: - use macros for IRQ definitions - merge rn5t618-core.c and rn5t618-irq.c 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 (7): dt-bindings: mfd: rn5t618: Document optional property interrupts mfd: rn5t618: add IRQ support mfd: rn5t618: add RTC related registers mfd: rn5t618: add more subdevices rtc: rc5t619: add Ricoh RC5T619 RTC driver iio: adc: rn5t618: Add ADC driver for RN5T618/RC5T619 mfd: rn5t618: cleanup i2c_device_id .../devicetree/bindings/mfd/rn5t618.txt | 4 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/rn5t618-adc.c | 256 ++++++++++ drivers/mfd/Kconfig | 1 + drivers/mfd/rn5t618.c | 119 ++++- drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-rc5t619.c | 444 ++++++++++++++++++ include/linux/mfd/rn5t618.h | 26 + 10 files changed, 862 insertions(+), 10 deletions(-) create mode 100644 drivers/iio/adc/rn5t618-adc.c create mode 100644 drivers/rtc/rtc-rc5t619.c -- 2.20.1