Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp56305lqz; Fri, 29 Mar 2024 08:24:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXpJ35WiqDGTLeUJdVoDMfsyjJza1VrDhARBsJgomxWAmDYvv0rwPRuHIE21mereEBQawRgsxI4ze+OhQflA9I7dYfvq5Y73b/wYfjPNQ== X-Google-Smtp-Source: AGHT+IEmBZ3ozwVKauLq0M0ktzJPGWCE7cplLyLI4a4iefinSouzvB+cJgIH5G/9nxlEdYVzjKAW X-Received: by 2002:a17:906:3803:b0:a47:4141:f60f with SMTP id v3-20020a170906380300b00a474141f60fmr2234145ejc.17.1711725846513; Fri, 29 Mar 2024 08:24:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711725846; cv=pass; d=google.com; s=arc-20160816; b=DjRyawd6WC4BW5ASCNm18dFeue2g2hPLhnXppxbN5ynqdUpu7l1MdxCRKmC1yO1t/6 MBikB6dSLHEA5vW7dG1O/oMlXqZUrAbM7hhZeYz10IFt3GD0VX6Wedx4R8ZXH2qeXDWs FED/jSuaZFfPH0ehmvN+0Dzdr4w7nWQtadS0t/j4zXlIV95eRYhA82w+ky/O0X0TRbUy ZNXjwpJ/3+fV7hrzkuaQwflLlgVt1gUj1Dy2Vv7XqJ9FPhUlocrq/k5liX8G70UMihQ2 JxcL3poDy/P7QxrVOWAM8+F5tWGCXa6FaEXLHYlLIVlg1muOgHOrC4q5Fs6/TAgWb0yb loRA== 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=HZiOyoM4VReLCl+X3HGduolzIuLdTAfpmEDmlPASeuI=; fh=1asyIGui0nkvRHZYVk6+ZnsQgSj7KKbwtkMiZz5SD2s=; b=S2oa3KGX2rCgY9MES/tPymoftEp+BPS+qDUiMjez+ERPAns1po5nncJZ9x2x/Hjmh/ GD5ciUt2aD1VSk7Ivq5VwBG/qTP4z03f9wB7Rbjs9HdUBNUkH+2rE+Bvel9yUuVQkHpN nrdWWrV3G+DJLJHXU0X5zZU8RH1KZ2cah1FiJzX4fhL/Jyxd+xx6UXWCeMxLIuzbPLzy cIdEt9oQn0+1BUx2JNSeoYY4JARjfqBajgyHbfcdKZjoisPZAAY6lB6gkHJDPrJW2R3a xNMT1n99/azgYujf1fSWMpnGWwovM1OspjtXSpIFd/VvBOenJYPvTehv0+JCTAZq8dN6 vOGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=djX+2aS3; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-125116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id he15-20020a1709073d8f00b00a4e2db3d8b3si1121117ejc.105.2024.03.29.08.24.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 08:24:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=djX+2aS3; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-125116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id AF9931F28099 for ; Fri, 29 Mar 2024 15:22:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 967F817E; Fri, 29 Mar 2024 15:13:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="djX+2aS3" Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 E245B1FBA for ; Fri, 29 Mar 2024 15:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711725202; cv=none; b=DZju2R8NzedAIlfJIM2WHwrxkiT17BaiiOCGI3qcyx5LLn884F3DT2HfVB/99D6VysAO5VSPFgZmz1bcQ/0s5f3KnwZF0LIqNksZbJ8Zd7NnCVR3+qjePEaPXXezALs/QLf1hWX/rmo/lnbEWb3tePbK9ALdjmOX1Yr7W0v2HR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711725202; c=relaxed/simple; bh=HZiOyoM4VReLCl+X3HGduolzIuLdTAfpmEDmlPASeuI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=WKngaJ65F33Me6O18QpmnUibzjbwbitoBZlb7kfcwLCUNTD0inftr4NR0rU/MD5QRjBY3tEwg+1aRbJSlArENOXsRtm6uNMs/r6yNqyEV74QNEe1RgKoZ4fNPHLHXsfajvmIrrYY4HCmMeCxfWEFDyav/drN1wvfIZqFEHg/rUI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=djX+2aS3; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-6145a4c79cfso3239117b3.0 for ; Fri, 29 Mar 2024 08:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711725200; x=1712330000; 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=HZiOyoM4VReLCl+X3HGduolzIuLdTAfpmEDmlPASeuI=; b=djX+2aS3pWI4vhKDEMK2bsBNCLGQllZFW7EJyzjtNIU0aMmIqdTS7ayaPlFHczVMLi Sn4zxIN/jM0BArCoSfdUYlBBRSBPcyU44TEz4+4nVlqIiebjpGWhb3izL0WR3X06JMNd Gz/PHTenWtWTk9Io1GqgU+HGjjnWtIOrVs1uDmrOoB1OsoYV+oXBMyw33rZJWGlfT4Pt 87DQ5Qu2GZDVmT5aa3xJob4OFry1zrYql6dhgR48/syyLjDeQ0rkC9NVIk0dxSuRaqKX kDVbJNJpxofTwwT3nduleOPwsr1ThUjlE9ot3ru1qHVcXqyoe5OcxXoYErPqUmTHZO6/ EUrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711725200; x=1712330000; 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=HZiOyoM4VReLCl+X3HGduolzIuLdTAfpmEDmlPASeuI=; b=SJ41dnHans0MU91ICVLrwxmph/Xh4PutoQtx1mpw8Y0R/HaEMDkoeSjjXuN83fjWze iDkSAA+PangDLWb3KAt4fm6y0r6EtxsqcsnromD0fAJHUV/IEJTVvb2c3LPAFKnPheo0 E8bSpBiv05srqKF/AABKwtbmcamWFR56/kBrsg/4WNtudVcBQFjWTn/WsU0+dDMXBQjm dfRMCSX9KJ2sDEVbHkfpB98WBdnDSokOSJqhlaYvRX7FGmlc/IIPHmyHQQk3xWA/5RO0 Ou5PRsxkzd3hIkDBNDOS6qWqtlB7Jh4XL4EWqmIXwLl5ufli+kTC4uHZHPiae3Cjmrx/ HvYg== X-Forwarded-Encrypted: i=1; AJvYcCXMpPTjeYdijqQv1X7v716gdrMC4gyvB71vCGv6Z6sUzb3UF7PU6dbiAZXxlGOmmhOOjrHEu0O8w5PXBdyd1YAMfn417bD43YL+oEmK X-Gm-Message-State: AOJu0YxXjLBrTBZ3l5x1bTyzRcAKXG4nVKo0ly4yJYFUBuB/KFQoRBQb JDNl3AWSQhIQEMNMexPZUBDBJOBAzoNb/FlCNzYEQv28DP7cloVoaD6B43fIJL4Z/BVpIc3KZxk x8vMUBERnc5/bcf1uLkWR7tQ8F6P5+MQOtz3u9g== X-Received: by 2002:a25:aae3:0:b0:dcc:97e4:bc61 with SMTP id t90-20020a25aae3000000b00dcc97e4bc61mr2648037ybi.57.1711725199846; Fri, 29 Mar 2024 08:13:19 -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: Dmitry Baryshkov Date: Fri, 29 Mar 2024 17:13:08 +0200 Message-ID: Subject: Re: [PATCH v2 3/3] platform/chrome: cros_ec_ucsi: Implement UCSI PDC driver To: Pavan Holla 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, 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 removes > > 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). --=20 With best wishes Dmitry