Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp613807ybe; Thu, 19 Sep 2019 00:35:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTLpSAdAFCYLKVgnDIWFi50215bjdjCcGBuOHz09Aa4UfSUxXOgLV6RvIsSEzDGQg5qwFW X-Received: by 2002:aa7:c897:: with SMTP id p23mr11227977eds.199.1568878509459; Thu, 19 Sep 2019 00:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568878509; cv=none; d=google.com; s=arc-20160816; b=NlckZT3Si2ZAL6Q4PladXR1kdVQpxEPQCoREy0gksqDtMfe6Mh9I9jf6l1RXwuCsYA pfH+9jdx2OEy88278mQxM2H2wV6fnucXlRFrQy5T0JQOyfWozUZJdknUBqOrMjn+jhyE WZLAYESxlN3oYfXxBzK62K60FMWzLFQogmEXT4Z5WOvhVgEscLhpcb+dNfKjY2Zl+Gbb ww0Y0UZ89uH1lioZesY1vHpXsZ80ADjv7u4JAXKV2Dzy+pPuncSSuVg+iu/HrEsS9oox 25RacnpsKqZiiNCllhuYFO2HFyaeofpIwukdxRye3aFl+I99JPDC+LW33rXqRte1Necs TANg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zYC9c0xzUXu9+1JCCZ/6grej11cpKjpeT/pQEN2qRIM=; b=G5ujSTji9xj1RrBNCp5DGUCAVfEpGVOtqWD3pIiJaUNpZij68tjvarPQdNhsoTsNDN i/2sFuotp7Pc1MOIT5//THldoyxuUDKw7ABUROBhCtSKehucSF2i5QCIhQZIPjRZPtMx XlrLyTWBOJyZGc5/JdVVSukXkLNEkS5d5bNPNlFObVWiWW/UNB0hPSsLoToi7am5JuxE vWakI0nwxVOClKk/QVg2Lck4D2FDfmmRIteaTn+4YhdNGc82uc5FsKFG0lX8AYqaImJ6 BhSz4OJW+R8WlQaiHBru89oHKK1i1lFi1ysjcS5vW7IZXSzJkZcWOq+gOX7vVJJKrPg0 wWVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=L4XqqS3n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o21si2772012ejr.208.2019.09.19.00.34.46; Thu, 19 Sep 2019 00:35:09 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=L4XqqS3n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388045AbfISG11 (ORCPT + 99 others); Thu, 19 Sep 2019 02:27:27 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33847 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387929AbfISG10 (ORCPT ); Thu, 19 Sep 2019 02:27:26 -0400 Received: by mail-pl1-f196.google.com with SMTP id d3so1130903plr.1; Wed, 18 Sep 2019 23:27:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zYC9c0xzUXu9+1JCCZ/6grej11cpKjpeT/pQEN2qRIM=; b=L4XqqS3n1K8UuyE00P2dcioyr7f2tslP+5gokPZOLa18lUOudGiu7ALFKe15xvlfUo 7vjfPuTuRyxc1/7y6sQSdrxfnIwkjzl/YYHWQX6V+CyxEXY46YqKUO2kjkbmHjkvXTVq 7tUPBr8X3Sa2LFFNwpbdbPWtfM22lzEFRdvGaZAB69HTMk5Dm0q1WYnKoZtlPgHiEk0e KqffXAPAXw5JJCO0AMNRepTrcA8IxeJHpDz8Z7zok2jwhu/Dt3Ur2QnLFcUVJ3lzRpQW KmzfJqTPjj9fcUAXsDCxwYnVUYc7Vro8fQAyiGoN5XpP0sZsiuqi9qR1/B1ymX1VKGvM 2Y9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zYC9c0xzUXu9+1JCCZ/6grej11cpKjpeT/pQEN2qRIM=; b=Ne36q+C1wjSjhQbgu9Qf+xAx8Yrm3Xai6FUYs5nTfG6GMxP582+Q+fFV1MCmA+iYTx rORv+bVFu9R8/h85edCIrN6QlakkvfaQAn2L2qsWXm1n+PclTl72qHHvLDf29cYJFX+e PDIRpVpQugdb0L6+T+fDYZOyFm5ny8e6gNn90wDdmcpIjCkB2axERkYLEel4UVi6EZvn mZIr16OSS0BoQjjnmL657Cg2TG8ihSy11z47yrbzLXgvF65MofANcXeJeP9DcMHu8HDB p45DZwXshLYAy3UnLcenM/p73jSfY4dIttmIUgJuudOnm/NlOlWbV5egTiu+CYFWvJAz yy3A== X-Gm-Message-State: APjAAAX6O+WbWn7JSjeqBWZMWFm0h0fgD8udE6bS340EXhCMp2d0sd5J dw/XanWgb2Etj2u1d5gRIqyDlhQeo2hd6HMurU0= X-Received: by 2002:a17:902:b208:: with SMTP id t8mr8179629plr.262.1568874445884; Wed, 18 Sep 2019 23:27:25 -0700 (PDT) MIME-Version: 1.0 References: <20190918225337.9860-1-jekhor@gmail.com> <20190918225337.9860-2-jekhor@gmail.com> In-Reply-To: <20190918225337.9860-2-jekhor@gmail.com> From: Andy Shevchenko Date: Thu, 19 Sep 2019 09:27:14 +0300 Message-ID: Subject: Re: [PATCH v4 1/1] platform/x86/intel_cht_int33fe: Split code to USB Micro-B and Type-C variants To: Yauhen Kharuzhy Cc: Darren Hart , Platform Driver , Hans de Goede , Linux Kernel Mailing List , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 19, 2019 at 1:53 AM Yauhen Kharuzhy wrote: > You so fast with new versions that I had no chance to comment on. Finally here mine. > Existing intel_cht_int33fe ACPI pseudo-device driver assumes that > hardware has Type-C connector and register related devices described as > I2C connections in the _CRS resource. > > There is at least one hardware (Lenovo Yoga Book YB1-91L/F) with Micro-B > USB connector exists. It has INT33FE device in the DSDT table but > there are only two I2C connection described: PMIC and BQ27452 battery > fuel gauge. > > Splitting existing INT33FE driver allow to maintain code for USB Micro-B > (AB) connector variant separately and make it simpler. I didn't get what (AB) means in this context? Did you mean "(or AB)"? > Split driver to intel_cht_int33fe_common.c and > intel_cht_int33fe_{typeb,typec}.c. Compile all this sources to one .ko > module to make user experience easier. You forgot to replace typeb here. > - ---help--- > + help This is unneeded churn > + CONFIG_BATTERY_BQ27XXX=m and CONFIG_BATTERY_BQ27XXX_I2C=m for Micro-B > + device and CONFIG_TYPEC_FUSB302=m and CONFIG_BATTERY_MAX17042=m First s/and/or/. > + for Type-C device. > + * 1. The Whiskey Cove pmic, which is also described by the INT34D3 ACPI device pmic -> PMIC > + if (IS_ERR(data->battery_fg)) { > + int err = PTR_ERR(data->battery_fg); > + > + if (err != -EPROBE_DEFER) > + dev_err(dev, > + "Failed to register battery fuel gauge: %d\n", > + err); > + return err; > + } > + > + return 0; I would rather replace this altogether by return PTR_ERR_OR_ZERO() like it's done in the other function in the original driver. -- With Best Regards, Andy Shevchenko