From patchwork Tue Nov 2 09:49:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 12598337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A77D9C433FE for ; Tue, 2 Nov 2021 09:50:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9596B610D2 for ; Tue, 2 Nov 2021 09:50:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231625AbhKBJwk (ORCPT ); Tue, 2 Nov 2021 05:52:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60898 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbhKBJwS (ORCPT ); Tue, 2 Nov 2021 05:52:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635846583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+/qOVV3GWWwyv36CwuqsRbEhyl0VVy51ttzWNK0tWNY=; b=g0F21LNc7s2ykWFXDJQSdBiTYfjp4MM6O3kyMzy9OXLYMs911u0OkWKIeBhAbkgSF1BonO 9yGUjCXvS1F08MszjCEtMo4CSBIynfOOD4WtPP/oEbwFouzpmkvlm8Oa2scJG4+DBSWEig tREbbhQZkwTltN0CUEAezDjmIEUaLKA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-xVMiX3E0M3C8XLhGNGKwGA-1; Tue, 02 Nov 2021 05:49:40 -0400 X-MC-Unique: xVMiX3E0M3C8XLhGNGKwGA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8C6779F92B; Tue, 2 Nov 2021 09:49:37 +0000 (UTC) Received: from x1.localdomain (unknown [10.39.195.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id D97615D9DC; Tue, 2 Nov 2021 09:49:33 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Mark Gross , Andy Shevchenko , Wolfram Sang , Mika Westerberg , Daniel Scally , Laurent Pinchart , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd Cc: Hans de Goede , Len Brown , linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Sakari Ailus , Kate Hsuan , linux-media@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH v5 06/11] platform/x86: int3472: Enable I2c daisy chain Date: Tue, 2 Nov 2021 10:49:02 +0100 Message-Id: <20211102094907.31271-7-hdegoede@redhat.com> In-Reply-To: <20211102094907.31271-1-hdegoede@redhat.com> References: <20211102094907.31271-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org From: Daniel Scally The TPS68470 PMIC has an I2C passthrough mode through which I2C traffic can be forwarded to a device connected to the PMIC as though it were connected directly to the system bus. Enable this mode when the chip is initialised. Signed-off-by: Daniel Scally --- .../x86/intel/int3472/intel_skl_int3472_tps68470.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/platform/x86/intel/int3472/intel_skl_int3472_tps68470.c b/drivers/platform/x86/intel/int3472/intel_skl_int3472_tps68470.c index c05b4cf502fe..42e688f4cad4 100644 --- a/drivers/platform/x86/intel/int3472/intel_skl_int3472_tps68470.c +++ b/drivers/platform/x86/intel/int3472/intel_skl_int3472_tps68470.c @@ -45,6 +45,13 @@ static int tps68470_chip_init(struct device *dev, struct regmap *regmap) return ret; } + /* Enable I2C daisy chain */ + ret = regmap_write(regmap, TPS68470_REG_S_I2C_CTL, 0x03); + if (ret) { + dev_err(dev, "Failed to enable i2c daisy chain\n"); + return ret; + } + dev_info(dev, "TPS68470 REVID: 0x%02x\n", version); return 0;