From patchwork Fri Feb 9 16:02:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 199070 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1070646dyd; Fri, 9 Feb 2024 11:10:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IH66Wi3DTQsQgLxgYKb8IL45hNLgWEiHfQwj4JtBvwMftoxMyU4UO5gK/F9c4OZaUnmy/0o X-Received: by 2002:a05:6808:5d1:b0:3bf:f3d2:df11 with SMTP id d17-20020a05680805d100b003bff3d2df11mr2393714oij.33.1707505834261; Fri, 09 Feb 2024 11:10:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707505834; cv=pass; d=google.com; s=arc-20160816; b=oL0ImoX7/gsQ+F6yIHdobZ8+9vQsAEbYDTycceGmyQjqtvDJ8xyJ3gygLWfRRH2vSW u/uVuvjjRCBoN+vAX+ooTIRfjQr65N9zIkiJ/r0IKlEiT1lPEBj3c0Ad3x8fNzVhWEAe V7hIRVi/esaGNFewZxvooZxgp1hHsh79FU3SdJ93eo8iRvRIL18MrRUAtsSbqbva/ab8 ZhacDGgKF5xvIf1qCZ+8SlhpS/uALdyjNlYeQcTiLdekvP0ABOzKGtq5zFgK7THeK14w gO9RzO++XxsiRv/kHWGeGzqKylUYPjXUrrq48Uysl/mvOuj+7sD1A9FHfZIbS8GFPWUH 8xcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=8kX5Ko936WhY8mItIEJW3eUoLh8rXkx9BdpaRsivHAA=; fh=eG4UgOsL8EuW4E4DKryFpBrDFXeUTpj4BRWS4DsDDWM=; b=TIk8zi6k/NPEGZ8SytlN4nEMzk6EJ+AQAteh3R8WqTBEFJYKPhIdpFqcD0/105HES0 g79faPZOmom2IouphXy3sH8hlWnfyJ5ERJUD+RtSX4PJbTt4dt41KRGy5LDAwYrSAes/ d70cdreWHvNFc6plm39xNPLso7cYrIHN4gMFChzu3r6dFCPOl5xlpNTxb0+aKXYHS+Ss KLrVmq5hiHvI47ORRD8vCueVP0U+1abBLVYJ6X8sKGQvFaOce+4EMQXsyMihLrM6EWgA 3/f/Xf0zKLwf0KybY5Ov0uYmj8rqvLxAKUrtt1j6Y6acyVHcuW4OKjeSvU0oLM4UU0oB Y/Gg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HN67/GcG"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXVHchFCnwjR4lSWVICM9b4S5rm0Vj/neLaISphaM7+PvDmtQhkYPhP8V9UsAJiEuEv0+5h+Ubc2FEFbVdcEGtkxVbE9Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a30-20020a05620a439e00b00783da601714si62025qkp.574.2024.02.09.11.10.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 11:10:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HN67/GcG"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-59574-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59574-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CA9211C215C1 for ; Fri, 9 Feb 2024 16:05:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C01C7BAFE; Fri, 9 Feb 2024 16:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HN67/GcG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C24577BB08 for ; Fri, 9 Feb 2024 16:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494624; cv=none; b=iivLV2e+B8ERMwaIDSSUVxncK0B1XOf5LmvK7hujm43iila+YBHRNVlRr3B9y8qHyj3Io+hD9+VTON7WgPUzO6BoUJ/Eu/jjcZ9oxHfsmSAXyzGDL7unPCAjNbHdV4L/O5lvKMjdu7k5aj5KVQ5nsNTtF8lU+50eyEk9e0U+OSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494624; c=relaxed/simple; bh=rwEsgngaV9IDPY5c2M3rnBWaSuyjqeEB7+v3YF0TYSY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aqsM3k+lIkiXrvr9uq9k3p7knDEl7KG5Wlrh8mmaj522M3ZXBHy/lY/XeaJnjBQWz3UjkdZMqoXChkHBnbxvdBW6gGj/m3e/MoDaI5ROGooOZ56VhNPIXl4ohOkkbiNvBc76PQU1FfWHDjG+jkxBaQtdMdovWLd8f2tfdAYiWus= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HN67/GcG; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707494623; x=1739030623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rwEsgngaV9IDPY5c2M3rnBWaSuyjqeEB7+v3YF0TYSY=; b=HN67/GcGiSrph1/H5Z0oJfN5kPLDBU1my0dHm/iCDnbHWxKYJytIQ/bQ bu51FvuohZUPyFxPXzkzmsrC20zFr0S+I3puUHVluawEVfWBTwvedfuv8 cUtvf9KBYpZWhTv1L5dz42NANY5FL3RXLrMVCllAxoVg9XK2H1yIvEG6H 3DqfCpZaaj7coW/aUfFkep5vrfqTxe37IxSv5TEOAmv/7BPHDERodr9P3 Mp2hHxRzPlcAdGKpLBBVwawy8BJ6/qi66E8Nvag+NErHzTVmwFo9jBjBX 5mejw4TbILO6sA+LFhK7yuPY6yZwT4A5FB5j+Fn8rmnILoH8vDju7csta Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="4432022" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="4432022" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 08:03:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="934459659" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="934459659" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 09 Feb 2024 08:03:37 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9AAE3161; Fri, 9 Feb 2024 18:03:36 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Vinod Koul , Kishon Vijay Abraham I Subject: [PATCH v1 2/2] phy: ti: tusb1210: Define device IDs Date: Fri, 9 Feb 2024 18:02:15 +0200 Message-ID: <20240209160334.2304230-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240209160334.2304230-1-andriy.shevchenko@linux.intel.com> References: <20240209160334.2304230-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790449637467995635 X-GMAIL-MSGID: 1790449637467995635 Define device IDs since some of them are being used more than once. Signed-off-by: Andy Shevchenko --- drivers/phy/ti/phy-tusb1210.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/phy/ti/phy-tusb1210.c b/drivers/phy/ti/phy-tusb1210.c index 7232b104a62d..13cd614e12a1 100644 --- a/drivers/phy/ti/phy-tusb1210.c +++ b/drivers/phy/ti/phy-tusb1210.c @@ -17,6 +17,10 @@ #include #include +#define TI_VENDOR_ID 0x0451 +#define TI_DEVICE_TUSB1210 0x1507 +#define TI_DEVICE_TUSB1211 0x1508 + #define TUSB1211_POWER_CONTROL 0x3d #define TUSB1211_POWER_CONTROL_SET 0x3e #define TUSB1211_POWER_CONTROL_CLEAR 0x3f @@ -436,7 +440,7 @@ static void tusb1210_probe_charger_detect(struct tusb1210 *tusb) if (!device_property_read_bool(dev->parent, "linux,phy_charger_detect")) return; - if (ulpi->id.product != 0x1508) { + if (ulpi->id.product != TI_DEVICE_TUSB1211) { dev_err(dev, "error charger detection is only supported on the TUSB1211\n"); return; } @@ -562,11 +566,9 @@ static void tusb1210_remove(struct ulpi *ulpi) tusb1210_remove_charger_detect(tusb); } -#define TI_VENDOR_ID 0x0451 - static const struct ulpi_device_id tusb1210_ulpi_id[] = { - { TI_VENDOR_ID, 0x1507, }, /* TUSB1210 */ - { TI_VENDOR_ID, 0x1508, }, /* TUSB1211 */ + { TI_VENDOR_ID, TI_DEVICE_TUSB1210 }, + { TI_VENDOR_ID, TI_DEVICE_TUSB1211 }, { }, }; MODULE_DEVICE_TABLE(ulpi, tusb1210_ulpi_id);