Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3110484pxb; Thu, 10 Feb 2022 12:30:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCoCwc7EqxsXc23+GThudl6XY+CMmjfTMyOIB0EqnCLvZ5svuREVWAaKEiX/NpLFENwy1D X-Received: by 2002:a17:907:72d6:: with SMTP id du22mr7651152ejc.643.1644525014912; Thu, 10 Feb 2022 12:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644525014; cv=none; d=google.com; s=arc-20160816; b=dMhj1szOX2o349HrqVIoYE16w9vQSdmr5Mge4wNWRDS4bWCRb0AAjkUcBmGp6As9gt ai3wZ36wcG0slurIaKnSXt6/VJNgrhkMK361t3S0v3tiz9QqnxXERGLCKmQ2XB30gHiv xiPcSaWC2Yiz7Y8r8UB6pHCPegNqiKAKkdLSRQbDS/BPv2o1Nv/1NHjEprfyqduXBFfM uSLkAN07dQGQEnpQd9+wRNVZNRKk4Wu757/B/H3rp0tTSUSYxrWzhW4Nl+xfpUvZXn63 EiiQPpqCtrzxr5l9qyXcIf6z0bjTsVq7mVldPDRTx7U4vkcHWZNWKB0d+Q3OdWFbhPCp Tshw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mfykEeq/PTWMM19FDkGyT6i2vjI4PN8vGRSXZaauxBA=; b=yzES9OqGoiZ1CCOW2xXiXDt5JoUAw52j1z80AQUFh1I98V9pjlvRFiArWuHH2kzfUp hQCxaYgwH98vypgPgZG69N8R5sN4FSzOUYIULBg/FykR+n9oueRx2F1Jz9oLOTv7ouxC fgwNaVH2qnsOoXLm21tUF2Ofv9p4eyfYxAQfBs5Wz62IOQpRO02ZciXBD4fq7lHWmovv iWTtZwRJ/5r5AC6csTsPyE/P+0CXr0fpoeB92kJvA7ZLpEnLOh4QczNAlmqKzOlyvM3N OVuh3KQ/pq4g6c6prytO7W4ierf02xBaWPQxYmp3oFLwOkSsAWIgUhY+ehX3URiwEVwE du8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20210112.gappssmtp.com header.s=20210112 header.b="J99beh/d"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2si16421743edc.412.2022.02.10.12.29.50; Thu, 10 Feb 2022 12:30:14 -0800 (PST) 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=@semihalf-com.20210112.gappssmtp.com header.s=20210112 header.b="J99beh/d"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243372AbiBJPFO (ORCPT + 99 others); Thu, 10 Feb 2022 10:05:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243368AbiBJPFM (ORCPT ); Thu, 10 Feb 2022 10:05:12 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30791DB1 for ; Thu, 10 Feb 2022 07:05:09 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id c5-20020a17090a1d0500b001b904a7046dso7265539pjd.1 for ; Thu, 10 Feb 2022 07:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=mfykEeq/PTWMM19FDkGyT6i2vjI4PN8vGRSXZaauxBA=; b=J99beh/dFKbwczl+iefr85tYXygTDqzfmcp4hD5snVXbMessrrsZcFNMwOihVibpjf l0zGtzlnzw5SD3iCmXiusUnz1nRyHcdbs05hmQ7s5vaaNX8n8YVxawCGYYB0RbDUzmPa nKicx9V4k29lZtUW5XcLf5qSj4Yh9RPGSUqwYt2Ypr4sEGQrYLdmZ6knOfjJ8D5AvMyw bS3jU2Zocl3m1w3iYKzy90frCk2g6+k9igHjJ6fXlZZ5h3UH4cbwJN+5Qet/TP6pQs5C Ug+CjjEI1+XL6I9wAobYFdmLYRSzJbpDrXi2nXDTQ3nta5yP6HRXyuMgRtDawx7GTmMI olfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=mfykEeq/PTWMM19FDkGyT6i2vjI4PN8vGRSXZaauxBA=; b=6NgEIH8P6cV1DXzoxAc/JMju1BykNCwyUoR5IkzoetQG1Xtrwy9smtjyowNOvppGhr v7pmtHno3DhIW7I7J2vS22HeowPO5HKNKuI1e65afY6A+t/RLnn25dYxwzn8roHvy6JW KFMiXbhbBnA8DRoD5BoWoLocBx8jzGSgdzOSvwykyMj7AFvutInxffZl7vNbB5oZFfmX H6gdDgCOTumOjEFEuAIUt+IBWsD5LCUVZ5FjNx6l0HInBE82YB5jOe4BqSzeP0Bnnr/X YnC4znzKIhMGM/P0Ma3CXqeFFLQAC7F95BUSiqPghdEo6NJeZ8CM8MWl5T/9py/T564C C9zg== X-Gm-Message-State: AOAM530/w+5MuhaUkdiixURnQoLTpGL8LOhYUzEQtI0GRz0mYB+yhiQt uAMu9WYOtkwWxL0ML1hVrch5aTg6vKwvwVVdUrzGwA== X-Received: by 2002:a17:90b:4c08:: with SMTP id na8mr1472697pjb.90.1644505508583; Thu, 10 Feb 2022 07:05:08 -0800 (PST) MIME-Version: 1.0 References: <20220208141218.2049591-1-jsd@semihalf.com> <20220208141218.2049591-3-jsd@semihalf.com> <87fcba54-b54a-ea20-63ba-f447f4d34506@linux.intel.com> In-Reply-To: <87fcba54-b54a-ea20-63ba-f447f4d34506@linux.intel.com> From: =?UTF-8?B?SmFuIETEhWJyb8Wb?= Date: Thu, 10 Feb 2022 16:04:57 +0100 Message-ID: Subject: Re: [PATCH v4 2/2] i2c: designware: Add AMD PSP I2C bus support To: Jarkko Nikula Cc: Andy Shevchenko , Linux Kernel Mailing List , linux-i2c , Mika Westerberg , Hans de Goede , Wolfram Sang , Raul E Rangel , Marcin Wojtas , Grzegorz Jaszczyk , upstream@semihalf.com, Tom Lendacky , "Deucher, Alexander" , "Easow, Nimesh" , "Limonciello, Mario" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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, czw., 10 lut 2022 o 15:43 Jarkko Nikula napisa=C5=82(a): > > On 2/10/22 10:18, Jan D=C4=85bro=C5=9B wrote: > > =C5=9Br., 9 lut 2022 o 16:28 Andy Shevchenko > > napisa=C5=82(a): > >> > >> On Tue, Feb 08, 2022 at 03:12:18PM +0100, Jan Dabros wrote: > >> > >> ... > >> > >> I have noticed code duplication. > >> > >>> + status =3D psp_send_i2c_req(PSP_I2C_REQ_ACQUIRE); > >>> + if (status) { > >>> + if (status =3D=3D -ETIMEDOUT) > >>> + dev_err(psp_i2c_dev, "Timed out waiting for PSP= to release I2C bus\n"); > >>> + else > >>> + dev_err(psp_i2c_dev, "PSP communication error\n= "); > >>> + > >>> + dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive h= ost usage\n"); > >>> + psp_i2c_mbox_fail =3D true; > >>> + goto cleanup; > >>> + } > >> > >>> + /* Send a release command to PSP */ > >>> + status =3D psp_send_i2c_req(PSP_I2C_REQ_RELEASE); > >>> + if (status) { > >>> + if (status =3D=3D -ETIMEDOUT) > >>> + dev_err(psp_i2c_dev, "Timed out waiting for PSP= to acquire I2C bus\n"); > >>> + else > >>> + dev_err(psp_i2c_dev, "PSP communication error\n= "); > >>> + > >>> + dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive h= ost usage\n"); > >>> + psp_i2c_mbox_fail =3D true; > >>> + goto cleanup; > >>> + } > >> > >> If you are going to update the series, consider to introduce a common = helper. > >> Otherwise, consider a follow up. > > > > Thanks for your comment. Since Jarkko is running some long-lasting > > tests with v4 patchset, I would like to keep this as is for now (and > > make a follow up commit). If there will be some additional comments > > for v4 from him and will spin v5 - I will introduce a common helper > > function then. > > > Test run fine overnight, although I wasn't expecting this breaking > Baytrail since patch is practically touching only semaphore detection at > probe time on Baytrail. I'm up to you would you address Andy's comments > as a follow up or as v5. > > Acked-by: Jarkko Nikula > Tested-by: Jarkko Nikula Thanks! If you don't mind I'd prefer a merge and a follow-up improvement on top. Current version is tested and in case of breakage it would be easier to track. Best Regards, Jan