Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1674968lqz; Mon, 1 Apr 2024 13:33:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmNsLUZDNwyWbuuM825nRTTtPz01f58dkhYfDMlb7PIAkV4dQ+5XAwIEDdZYJCHv8qan2iqciXLRTob6zJacpx/cQz9WR5taqKNeNCYA== X-Google-Smtp-Source: AGHT+IF/XuRh0nQaOT8NX+6G2wAVntsUpUB+ib83pdr9d1k5IUeYZPaNiSsic5H1rWRSLz3InTpy X-Received: by 2002:a05:6a00:2d15:b0:6ea:ad01:357c with SMTP id fa21-20020a056a002d1500b006eaad01357cmr10429120pfb.22.1712003583485; Mon, 01 Apr 2024 13:33:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712003583; cv=pass; d=google.com; s=arc-20160816; b=e+iFMIKvHnM0rUqOxXUxj7wnALpU1Cv21qsSEHqjq+WpouvxuZE1D5MKcMz7ZO8EjE XzK3xnryJvd+BmycJFbJXJZXV5fXx3qLYFdhyPttXSp/p1tOlufW9toOG5QMAqoQrQA0 +g5V1AyQ4tHmErL+86utgXJrFRfDlEnuoZnr5ivpYqIFy5clhNttarW1Ghrpe0GojeqO A111uWh0KKPEoHq4byz08VlvEA9h1JUAbGiI6i2aZqcKl/NUgS5OiGr0uMLWcNBTfW9i rIQBfs1u6GXCvDMsDbdgs1Iw4f8iCBJN0btZUb1jrvklq66aPiCBZ5V88Ea4TTivjoT5 mlsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=WlWF4sZthTybsqjHZ3Wo3dh3Wr4y3oJSrsc10FAPues=; fh=BLm9d3szM8/oBWgg/kmHqnvVOl2SsOBZrttxrO64NEo=; b=ILd2nGeXhPoQChuJ+ytZ+YO4LqWfH1EMSqhqKU0qAtV9Y3a87hEt7pItQnLXkuATSP 8v6HbQ/JDq6C7VQbABlkhqtTOOyuthpv0nKIfQoml+pX86Q6DeqFAO6KU0cYv7p6NkfQ 7Db501L8l3xqGorMPmWXS/juNGPGvqFmFOUHYCi3rFj9CoJ5cch69o2dlb+MQg5AkGmy VKQyYy6cCN3e1FGsr7tLqfznnmVvJ3RtNtClONK/4511CptLqcfbM3KYme8IRsBnU2rI YC3oLaVE6iS3MbjtF9hUebhgTlMAvOALW33pXX7X7oAfRdR/QbqFCM8IsRtjnGDhEmzV jndA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKmcHhhW; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-127032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g6-20020a056a000b8600b006eaff9375b7si4828093pfj.340.2024.04.01.13.33.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 13:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AKmcHhhW; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-127032-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 30152282B53 for ; Mon, 1 Apr 2024 20:33:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D11953361; Mon, 1 Apr 2024 20:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="AKmcHhhW" Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E384D1EB31 for ; Mon, 1 Apr 2024 20:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712003573; cv=none; b=Zl3nXgDPegjtLPGwAFi/3l2Yp8IBa+TieCjahHIRdiVaSnGxGpGu9mkV6ojL3ZHSPyMVmxG46kB342XspAB7iiZrkPz82tKr6J1UlEVel8q4K0snHOoYC9RB5qaZQLwoBMyptEFDKq7qBJJDIJHKxH4Qm+1aQ9RbwgdaCWHAJVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712003573; c=relaxed/simple; bh=WlWF4sZthTybsqjHZ3Wo3dh3Wr4y3oJSrsc10FAPues=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NxO9bWG/2RRuF6yUU2/VmrTHtYmG9vUNhXv3pPZpDzd82s988KVZu6jQ39xdgfel/O53G+/Oia487HGOc/pBF3slFBub9/feqfhzZXJZ7Tca5D61Sz3YRwb2clZevwAH14JujRS7QQ1jkO1Bbuyep4PCSswc3sZYxkrnPw/gz9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=AKmcHhhW; arc=none smtp.client-ip=209.85.222.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-7e3257325b4so1052396241.3 for ; Mon, 01 Apr 2024 13:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712003571; x=1712608371; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WlWF4sZthTybsqjHZ3Wo3dh3Wr4y3oJSrsc10FAPues=; b=AKmcHhhWDMsQ+7vp/S1IgPhqwTgKRW1EL9voEr26+4ZuTfAv8IiQO+jz3oZLRMHbfB LS4BYnE20RySCks+AlE3cQ3rZiOadp9w/mWxAGaKtXBT1mGE3G/jtFb9fswth3W2E86V n3IK70UmPvnSKOhBFs7RN/KBYs0D2yWIITHBE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712003571; x=1712608371; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlWF4sZthTybsqjHZ3Wo3dh3Wr4y3oJSrsc10FAPues=; b=AwbZEzfzhHQJKDwz84XuWT7rSavPEEl5FRrDtut+TpZLtb5a5lx3Y6SXgAKhws9W9Y CzcgR9hYH7+oWxey/My1q5tq7usdBeR+ivvYB3Y4tzKb3BdusV03Z9TdOeePwDyC9cN2 TbpKz8JZ3v6Md+PrMkwRksoEL2onghtgI15hFkJlqPmVvMlp2uc/thMm5ZXruTr04g5p m4NUYTjWS+e8w668Qf+BicfzXfL6+rOaSwS7pC2L9aPfKftkLa5ViF1VT3RbckuDPLGG SMukpvls0AVLViqtpP00+dpp0Rf1An5wibhFAwksiCxVBti5cE4iHaytio8MuLd0OOs6 4tsw== X-Forwarded-Encrypted: i=1; AJvYcCWTo4rOcZCT9R0x25uftmTyO+VA6/h3tuvqDR2baiyWDDXgkIsAO4U3VuYCnyYuvOKd8D9OO8zEezyhPLP7liIZD8oPXz/+CguKEcxa X-Gm-Message-State: AOJu0Yy0FVuUNkCiL/eTndwpFr7HJygOiRXshshvJH6Sp5cOJl93FVgV P/sVVx+xU/hBKfYK2a2kEGxlDoTXKndPCw039wFwjxUeYbIuQziKcjWmy0u6yJqiXBJk5fIqDBn Rm2WB7xpqMIX7mb1cEP/3i1ePauSoXGL/ecrs X-Received: by 2002:a05:6102:3bc4:b0:478:2f66:f641 with SMTP id a4-20020a0561023bc400b004782f66f641mr7884700vsv.34.1712003570896; Mon, 01 Apr 2024 13:32:50 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240325-public-ucsi-h-v2-0-a6d716968bb1@chromium.org> <20240325-public-ucsi-h-v2-3-a6d716968bb1@chromium.org> <1b040be3-acd7-40dc-bc9b-24ea6d4b8377@linaro.org> In-Reply-To: From: Pavan Holla Date: Mon, 1 Apr 2024 13:32:14 -0700 Message-ID: Subject: Re: [PATCH v2 3/3] platform/chrome: cros_ec_ucsi: Implement UCSI PDC driver To: Dmitry Baryshkov Cc: Greg Kroah-Hartman , Heikki Krogerus , Benson Leung , Tzung-Bi Shih , Guenter Roeck , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Abhishek Pandit-Subedi , chrome-platform@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 29, 2024 at 8:13=E2=80=AFAM Dmitry Baryshkov wrote: > > On Fri, 29 Mar 2024 at 17:09, Pavan Holla wrote: > > > > Hi Dmitry, > > > > Thanks for the review. > > > > On Thu, Mar 28, 2024 at 8:32=E2=80=AFAM Dmitry Baryshkov > > wrote: > > > While it's fine to use platform/chrome for platform drivers, please > > > place drivers which have a subsystem into the subsystem dir. I think = we > > > don't want to hunt UCSI implementations all over the codebase. Please > > > use drivers/usb/typec/ucsi/ location for your driver. This also remov= es > > > a need for a global header. > > > > I agree with your assessment that drivers/usb/typec/ucsi/ is a good > > location for the driver currently. However, the driver is still in > > early stages of development. We may have to account for PDC/ EC quirks > > (we have multiple vendors), add FW update functionality outside the > > UCSI spec, or add PDC logging functionality. While I'd like to write > > separate drivers for those, some of this functionality will need to > > acquire a lock over communication to the PDC. Even if I were to write > > separate drivers for new functionality related to the PDC, maybe it's > > better for all ChromeOS PDC related drivers to reside in the same > > location. I am not sure what form this driver will take in the near > > future, thus I would prefer to keep it in platform/chrome. Maybe > > cros_ec_ucsi isn't the best name here, cros_ec_pdc probably conveys > > the intention better. > > In such a case please consider using auxilliary device bus or MFD > cells to describe pdc / ucsi relationship. See how this is handled for > pmic-glink / ucsi_glink. > The drivers/platform should really be limited to simple drivers, which > don't have a better place. Otherwise it becomes a nightmare to handle > driver changes (this applies not only to the UCSI but also to other > drivers which have their own subsystem tree). Thanks for the pointers. I will move the driver to drivers/usb/typec/ucsi/