From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 887E5C433EF for ; Tue, 14 Jun 2022 21:04:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VwFWyttJqErBPObuWbHY4lGpnJyaCMBQ+Wojv2Krnz8=; b=FKpeWqHGkd5qJ4 pt1CvnDrHsOYLJwC+Ilpgj2ekm1q1gdCTxMiCGcon61ubRLvw0mb1eyEQ+dwYeWc0dM8O84/XdKce vmR0VTU4C+kajSvT0HwTMtOiITQP644YJMFqLFkhvCDNB3BlU+quX3LaiS3hTPVMIuoA53QuwoUYK wnwAW+VZ0Rt5LQ1qPHKBAtqr6KfAMjZTcbLPe6SNGAzU4BrTuA8H9075BzePMor8Bgy37SNjvODQt 9LUSioL5WUodXH4J0ssR6ih0UnmhFleEHWDaIq+3eF5MdODH7YdXJOyoXQGa1Kv9+MuWl+sSTUs18 Vn7gV4UbLtSpbqS72Bxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1Dhb-00BJNc-C1; Tue, 14 Jun 2022 21:03:55 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1DhX-00BJM1-6D for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 21:03:53 +0000 Received: by mail-pj1-x1032.google.com with SMTP id gc3-20020a17090b310300b001e33092c737so158991pjb.3 for ; Tue, 14 Jun 2022 14:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=54uqX4hoxceYxZbvXXXTQIRCQh50Z99ozZMeQkD5dEg=; b=KPGKRgHC5n8hWs2HP0HefSE6DkYDIETw7epRbgNMqeA2V9Lv/O6MTXFZpSwfhZrQSx pPHYr/9NXuMF2wPXKlCtcPkRQmGoW8YTg7ZUFh0VFPchZdwTfzhVCshMqbJG5riAQPLI PDYS8v64XEw8vsdnYaJea9nU/dMobg8aXd1k2lnipdWh0We3aElzh6C9CzlZwQ0UtXbT MJ0dT5ahLlIXRIUOxz9SHanzYNlA3G71tKHRa2If59GERiWa/uSJTf+Ao2aVEv4KVzDi okFAfbBrEPXKHtHBp1hmSlUpbIzsL/v5P4mCeivarjnOxmlGAYh3OUtav88xmr2MRQCf Jksw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=54uqX4hoxceYxZbvXXXTQIRCQh50Z99ozZMeQkD5dEg=; b=Fw+boSa3Rbqg+l65t6+34L2udkJ11ZI4vm6JvPZ1TzaLTLFnB6GLEdG/oorJD7ux27 lBVLZCUElwwcF55Xjq6/8It6QuDcLeykBTy4OnLJYl8sDkWRralnaNrhXBvzIrPF1VrM a+dDtiww995mhgoNnlaUGJJc0hQXhIFQQfRwssX08Dmc/43xoi93X7UWpNBGI4htrMSp QE5RjmHpMQVrhZQmewrgrrGvlwu4LfYdx/YkyoGXpUvkrUAjiXRMTnZObwkPxpxqlj51 d5qor8g5OSP4zzKqNddtIFi9s4cSr8YFTUsiAKjOXmgQbm4YVRtCSyrR1zQn0RxUuy3/ e0UA== X-Gm-Message-State: AJIora8veU5w1umdAPyKpjHFAVOS92MVsCXN7NGM6oq9bAIKMdu3rg1r 2z1PDhCMaqeDcc6l881ssNMxLw== X-Google-Smtp-Source: AGRyM1uhtOpnkODqEAnt2BMBBTumHS2aKQXcRkaESL5xgjTuUoibnJg//T9j+N0OhBrTniTj1c+NWw== X-Received: by 2002:a17:903:2291:b0:167:59ad:52e8 with SMTP id b17-20020a170903229100b0016759ad52e8mr6373890plh.121.1655240628282; Tue, 14 Jun 2022 14:03:48 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id b7-20020a1709027e0700b001635a8f9dfdsm59307plm.26.2022.06.14.14.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 14:03:47 -0700 (PDT) From: Kevin Hilman To: Jerome NEANNE , lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, nm@ti.com, kristo@kernel.org, will@kernel.org, lee.jones@linaro.org, jneanne@baylibre.com Cc: narmstrong@baylibre.com, msp@baylibre.com, j-keerthy@ti.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 2/5] mfd: drivers: Add TI TPS65219 PMIC support In-Reply-To: <20220613090604.9975-3-jneanne@baylibre.com> References: <20220613090604.9975-1-jneanne@baylibre.com> <20220613090604.9975-3-jneanne@baylibre.com> Date: Tue, 14 Jun 2022 14:03:46 -0700 Message-ID: <7hy1xznej1.fsf@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220614_140351_493989_88CE18FC X-CRM114-Status: GOOD ( 16.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Jerome NEANNE writes: > The TPS65219 is a power management IC PMIC designed > to supply a wide range of SoCs > in both portable and stationary applications. > Any SoC can control TPS65219 over a standard I2C interface. > > It contains the following components: > - Regulators. > - Over Temperature warning and Shut down. > - GPIOs > - Multi Function Pins (MFP) > > This patch adds support for tps65219 mfd device. At this time only > the functionalities listed below are made available: > > - Regulators probe and functionalities > - warm and cold reset support > - SW shutdown support > > Signed-off-by: Jerome NEANNE [...] > +/** > + * pmic_rst_restart: trig tps65219 reset to SOC. > + * > + * Trigged via notifier > + */ > +static int pmic_rst_restart(struct notifier_block *this, > + unsigned long mode, void *cmd) > +{ > + struct tps65219 *tps; > + > + tps = container_of(this, struct tps65219, nb); > + if (tps != NULL) { > + if (WARMNCOLD) This value is hard-coded to 1 in the header, so war reset will always be done. > + tps65219_warm_reset(tps); > + else > + tps65219_cold_reset(tps); Doesn't the reboot_notifier get a value like REBOOT_WARM, REBOOT_COLD etc (c.f. enum in linux/reboot.h) so you could properly select? Kevin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98892C43334 for ; Tue, 14 Jun 2022 21:03:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233411AbiFNVDy (ORCPT ); Tue, 14 Jun 2022 17:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357780AbiFNVDx (ORCPT ); Tue, 14 Jun 2022 17:03:53 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC934506CF for ; Tue, 14 Jun 2022 14:03:48 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso191109pjk.0 for ; Tue, 14 Jun 2022 14:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=54uqX4hoxceYxZbvXXXTQIRCQh50Z99ozZMeQkD5dEg=; b=KPGKRgHC5n8hWs2HP0HefSE6DkYDIETw7epRbgNMqeA2V9Lv/O6MTXFZpSwfhZrQSx pPHYr/9NXuMF2wPXKlCtcPkRQmGoW8YTg7ZUFh0VFPchZdwTfzhVCshMqbJG5riAQPLI PDYS8v64XEw8vsdnYaJea9nU/dMobg8aXd1k2lnipdWh0We3aElzh6C9CzlZwQ0UtXbT MJ0dT5ahLlIXRIUOxz9SHanzYNlA3G71tKHRa2If59GERiWa/uSJTf+Ao2aVEv4KVzDi okFAfbBrEPXKHtHBp1hmSlUpbIzsL/v5P4mCeivarjnOxmlGAYh3OUtav88xmr2MRQCf Jksw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=54uqX4hoxceYxZbvXXXTQIRCQh50Z99ozZMeQkD5dEg=; b=mjrS1TCXNrMBaFyT06goBgZfCA9ojZSy2k2hMyiHnhZV0itLlfto9Vx2R5V1WZvdkN BoWtgkc+3KJJPexQGpRENlw2WeLU27DaJQ3QvBaA6u86Mpef0t2jXVUpJfOssOE53u+t F3fKzlLnRj7lBz+D+x6gQHMd5hIUi1lbK2xQuaqbLGewP8hqBgYJSpGrHyPhI+hIGVXP od2s5RASFIUnO18ZDJJA53ta3J5o0txTvxUsbPCg1lvdbHBHBampetYtGdNHYas+BTH5 oxY71bdullOJgZC+/owGeAvHLLDVOljPXG2N0Bdyif5E/3TU0I+fmQyBpKgDAEXPe68v 8Xug== X-Gm-Message-State: AJIora+xvcMKAvlnzSI2q5nfkj6Lo+PvIXC+RZjiwuwWxilEk+2GFk1E 9+18yKjylh23EQGhuDJ2UFEWBg== X-Google-Smtp-Source: AGRyM1uhtOpnkODqEAnt2BMBBTumHS2aKQXcRkaESL5xgjTuUoibnJg//T9j+N0OhBrTniTj1c+NWw== X-Received: by 2002:a17:903:2291:b0:167:59ad:52e8 with SMTP id b17-20020a170903229100b0016759ad52e8mr6373890plh.121.1655240628282; Tue, 14 Jun 2022 14:03:48 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id b7-20020a1709027e0700b001635a8f9dfdsm59307plm.26.2022.06.14.14.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 14:03:47 -0700 (PDT) From: Kevin Hilman To: Jerome NEANNE , lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, nm@ti.com, kristo@kernel.org, will@kernel.org, lee.jones@linaro.org, jneanne@baylibre.com Cc: narmstrong@baylibre.com, msp@baylibre.com, j-keerthy@ti.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH 2/5] mfd: drivers: Add TI TPS65219 PMIC support In-Reply-To: <20220613090604.9975-3-jneanne@baylibre.com> References: <20220613090604.9975-1-jneanne@baylibre.com> <20220613090604.9975-3-jneanne@baylibre.com> Date: Tue, 14 Jun 2022 14:03:46 -0700 Message-ID: <7hy1xznej1.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Jerome NEANNE writes: > The TPS65219 is a power management IC PMIC designed > to supply a wide range of SoCs > in both portable and stationary applications. > Any SoC can control TPS65219 over a standard I2C interface. > > It contains the following components: > - Regulators. > - Over Temperature warning and Shut down. > - GPIOs > - Multi Function Pins (MFP) > > This patch adds support for tps65219 mfd device. At this time only > the functionalities listed below are made available: > > - Regulators probe and functionalities > - warm and cold reset support > - SW shutdown support > > Signed-off-by: Jerome NEANNE [...] > +/** > + * pmic_rst_restart: trig tps65219 reset to SOC. > + * > + * Trigged via notifier > + */ > +static int pmic_rst_restart(struct notifier_block *this, > + unsigned long mode, void *cmd) > +{ > + struct tps65219 *tps; > + > + tps = container_of(this, struct tps65219, nb); > + if (tps != NULL) { > + if (WARMNCOLD) This value is hard-coded to 1 in the header, so war reset will always be done. > + tps65219_warm_reset(tps); > + else > + tps65219_cold_reset(tps); Doesn't the reboot_notifier get a value like REBOOT_WARM, REBOOT_COLD etc (c.f. enum in linux/reboot.h) so you could properly select? Kevin