Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35387169rwd; Mon, 10 Jul 2023 06:50:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlESUHLl5neDx2EPEG04i9Nt8cfouLD1i65aax/NgGFMPZ/tGdzUd5nAAXrJeA6CUboXcQ2T X-Received: by 2002:a05:6870:700a:b0:1a6:4f6a:8a72 with SMTP id u10-20020a056870700a00b001a64f6a8a72mr13405751oae.37.1688997019347; Mon, 10 Jul 2023 06:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688997019; cv=none; d=google.com; s=arc-20160816; b=L9V32lG5Z8SXRCjdipJYw+ry6+Z6k5qA+RLQ6KjOH347tQt7VF7GHxRW4jODnSErAr fPWa15CWY00TS+vZH6jGXEgQF5eXJKVoV+Vs7PvC3EZo0TsCFCy7U1XSuhkiuylujq9w UHYoJH/+6JXTL/Wbtwf3+04jER37ec3iA+20ZWObBoUDPT9q1iMjftINUTkU4KaNRMHj WbnjOjagJBlcfFKkkVKkAXnnx2Eq5B0KORaWG4wDbT8wiGVlN79nsKGDRtXgAgZUWTbZ cINi9qDL4karrwCZn+uOCEVOftwCAYeBHjy1ypabCls7K4fkDjaRmmsM5dAgkGfTB0N0 e1Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ak9fRbxuixcIYTWvlnH4cZYdZvxzAVmoXYAJWfQ6iRg=; fh=ZIJiVTahl295g9PACXGV5aTqFG8hnFIsgG5bI00k8eY=; b=V1UqO1ThiZ/HhDRohehNTBK0LT7CCS43GfD04OA+xaWInrh4aDzSZe6aHLTqWUu8GM ZM6Nwk1LzRCYk11iAZe0xTWSn2rU0Wg6ASNK2sEPcy7mqxWUT2trcnzgMuEwnVZ+X+9E vfHM89MyZaQ81wb3FvjFWoPdkysd3Bv+/VOjPQPf3qGUurivURjdxDNNnFUgLGKpPd2U kIQJfJzdYqlSzvAXgbZ5Y96fKYDInkAc6mBBanHoe/vOR7JTXiSJHpXfUbMSRwJeS+fW HY7VptXapLgiptP1mI/K27LRw/MaJ1UPo9aHkCnG7tXZKV+14Vpio0/bBsuqfxSP4nfy GDUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+Z0sMJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cu21-20020a17090afa9500b0026333ca2944si7060752pjb.17.2023.07.10.06.50.07; Mon, 10 Jul 2023 06:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+Z0sMJf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232113AbjGJNe5 (ORCPT + 99 others); Mon, 10 Jul 2023 09:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjGJNew (ORCPT ); Mon, 10 Jul 2023 09:34:52 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DD8C170E for ; Mon, 10 Jul 2023 06:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688996029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ak9fRbxuixcIYTWvlnH4cZYdZvxzAVmoXYAJWfQ6iRg=; b=h+Z0sMJfmkmR0u/i9eqClIvtNUXjitjXAzijoVWuVAKYoNOn0vWqBzgjzSOIDpJng8ky3g I6cn4te35Lj0I37ruhKagCSDDrLqpKd7VhHXXxOaUorL876NaCawD7DscTZuQM0rDOHwka Gfng7CHmy1yhDlipFDcO6cUfKxBOFX4= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-534-NggT6-l4PTuEHOQfqzb2Gw-1; Mon, 10 Jul 2023 09:33:48 -0400 X-MC-Unique: NggT6-l4PTuEHOQfqzb2Gw-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-51e166a4087so2679204a12.2 for ; Mon, 10 Jul 2023 06:33:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688996027; x=1691588027; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ak9fRbxuixcIYTWvlnH4cZYdZvxzAVmoXYAJWfQ6iRg=; b=l1j52rEbrf98NvBPjeJSv8Net6Vq0wCOlK65qogM7PyzT8f8RlFiRRzipsxG7jul4Z 1+jE7cta6YLbxNto1GV8cQVV0jsObvYaXeGKd3TeAj6lnUOhTYY6HkDVpKgxe35axSBL 3s2PdXUGPv2N9UPwYp7DO/PcUvXcbDbQQwHhipHy0sPy0DfnMl9ouNZjvyrqP1ylV2Vc nXS0Ei/QNuuguz8e6XDh7h5GaF0uZ4fjw0+7OImjOBJxclaApbZEX83EzcvchKg1dUN1 HBTwCSnd+RPSBEEfPXr0hdgyG1i8S0V2ypJjv0L+KHBClkrKJZMpvGqKG5Yn0wqpjZ52 sMPg== X-Gm-Message-State: ABy/qLZ2uR85d0EeYxmXcQ6ZXuZwcrVfylZV66LqMEZ4sPBFtzvsTdPQ 70sFKhp/n588QVhWf2iuX7yoiknz5gVA+Zhae4ru8+d1sAUtlSr1kht6+2u7B5N/gPJmbSVY0Xg rYmsloXahFKqvHdl3wgYBywdV X-Received: by 2002:a05:6402:1391:b0:51d:d48b:9978 with SMTP id b17-20020a056402139100b0051dd48b9978mr10787676edv.8.1688996027422; Mon, 10 Jul 2023 06:33:47 -0700 (PDT) X-Received: by 2002:a05:6402:1391:b0:51d:d48b:9978 with SMTP id b17-20020a056402139100b0051dd48b9978mr10787639edv.8.1688996027023; Mon, 10 Jul 2023 06:33:47 -0700 (PDT) Received: from [10.40.98.142] ([78.108.130.194]) by smtp.gmail.com with ESMTPSA id e16-20020a50ec90000000b0051e2a5d9290sm5781645edr.77.2023.07.10.06.33.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jul 2023 06:33:46 -0700 (PDT) Message-ID: <4a11393d-69bb-8e9d-3bfe-21aa7a7fb1e3@redhat.com> Date: Mon, 10 Jul 2023 15:33:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 1/2] watchdog: simatic-ipc-wdt: make IO region access of one model muxed Content-Language: en-US To: Guenter Roeck , Henning Schild , Mark Gross , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: Wim Van Sebroeck , Jean Delvare , linux-watchdog@vger.kernel.org, linux-hwmon@vger.kernel.org, Tobias Schaffner , Gerd Haeussler References: <20230706154831.19100-1-henning.schild@siemens.com> <20230706154831.19100-2-henning.schild@siemens.com> <876f6a08-1850-21cd-83d1-b309e7e1e912@roeck-us.net> From: Hans de Goede In-Reply-To: <876f6a08-1850-21cd-83d1-b309e7e1e912@roeck-us.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Guenter, On 7/6/23 18:03, Guenter Roeck wrote: > On 7/6/23 08:48, Henning Schild wrote: >> The IO region used for the watchdog also hold CMOS battery monitoring >> information. Make the access muxed so that a hwmon driver can use the >> region as well. >> >> Signed-off-by: Henning Schild > > Acked-by: Guenter Roeck Thank you. Is it ok if I pick up his patch and merge it together with 2/2 through the pdx86 tree ? Regards, Hans > >> --- >>   drivers/watchdog/simatic-ipc-wdt.c | 9 ++++++--- >>   1 file changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/watchdog/simatic-ipc-wdt.c b/drivers/watchdog/simatic-ipc-wdt.c >> index 6599695dc672..cdc1a2e15180 100644 >> --- a/drivers/watchdog/simatic-ipc-wdt.c >> +++ b/drivers/watchdog/simatic-ipc-wdt.c >> @@ -155,9 +155,8 @@ static int simatic_ipc_wdt_probe(struct platform_device *pdev) >>         switch (plat->devmode) { >>       case SIMATIC_IPC_DEVICE_227E: >> -        if (!devm_request_region(dev, gp_status_reg_227e_res.start, >> -                     resource_size(&gp_status_reg_227e_res), >> -                     KBUILD_MODNAME)) { >> +        res = &gp_status_reg_227e_res; >> +        if (!request_muxed_region(res->start, resource_size(res), res->name)) { >>               dev_err(dev, >>                   "Unable to register IO resource at %pR\n", >>                   &gp_status_reg_227e_res); >> @@ -210,6 +209,10 @@ static int simatic_ipc_wdt_probe(struct platform_device *pdev) >>       if (wdd_data.bootstatus) >>           dev_warn(dev, "last reboot caused by watchdog reset\n"); >>   +    if (plat->devmode == SIMATIC_IPC_DEVICE_227E) >> +        release_region(gp_status_reg_227e_res.start, >> +                   resource_size(&gp_status_reg_227e_res)); >> + >>       watchdog_set_nowayout(&wdd_data, nowayout); >>       watchdog_stop_on_reboot(&wdd_data); >>       return devm_watchdog_register_device(dev, &wdd_data); >