Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2285506imm; Thu, 11 Oct 2018 08:00:03 -0700 (PDT) X-Google-Smtp-Source: ACcGV6114tzQmjJNKawJgFBn+I/ghELwGKxAqP1FEIsWCANMxoSjh2gryi98MdPekvJCzv7DulHo X-Received: by 2002:a17:902:6948:: with SMTP id k8-v6mr1933069plt.75.1539270003568; Thu, 11 Oct 2018 08:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539270003; cv=none; d=google.com; s=arc-20160816; b=D9LqnaJKDCPrylyQZG6PTdctt52E5pBrpygK/9ADdgCVzkNuaaFHHSui7N1/RA7/06 MUITQzsfFxD9geCPYeQGu16JbrnWiwtplyuO87dGj2MFu07VzxQ3HJ9rftX95m4WB6kt 0ZPAkbfqmEE6Zcefqll8d/tjN3ZEbUDTdFWgOow8ZY0jJ51uhsI+rqctZ2yvUWhzjBSr gIQk5YsWT++mK2tB4e/GHpIeqg1TvoiskBq6hHXVyBP3ThjCAU4mVzakmZTpGE31J1R4 O/6zKh4IuCTkoFF/+zleQlsChg3FTfSe/hCiUDNfGFws4LOVPX65Vkd1bSL4qdrnHsSu JFPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Q2orOKrGnVUqJs4S7ttooafJFLobKsd4LuuZ0Mjqcao=; b=Nnk9JOlI9oDlj8Fp7o9IIU6zBBfIO14wHXY4PHS8uhMm3JiEgiL4ySUCmVALERiMD2 yU05Q1QuuPrtvDL3Bek/Hy7R+6IBQALjj/SV6y9CZRO/ImztsZCOcmCtEJOFxzvepMhB sn5skFr9CjFPgqgLTNJNfLhT7CiimN191v0Ou0Rl+kButqN4+19pD1ENfHGwHoBnQnIk JdTdKVMcNprnAXdgzKThPYP5jlkML3geRZ4Q3J2FC0Nahq94UCXm9pv7fbT+CHC2f6ic 5svAyThl5So4RZPHRp7qARmV/DGYUo60BS38jsCgZ+io22X7X19zdL8KmnYMHSB/jhmd fr/A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u70-v6si24938118pgd.502.2018.10.11.07.59.48; Thu, 11 Oct 2018 08:00:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728657AbeJKV4n (ORCPT + 99 others); Thu, 11 Oct 2018 17:56:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59704 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeJKV4n (ORCPT ); Thu, 11 Oct 2018 17:56:43 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB50DC04F4D1; Thu, 11 Oct 2018 14:29:17 +0000 (UTC) Received: from shalem.localdomain.com (unknown [10.36.118.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8948D765BB; Thu, 11 Oct 2018 14:29:13 +0000 (UTC) From: Hans de Goede To: Jarkko Nikula , Wolfram Sang , Andy Shevchenko , Mika Westerberg , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: Hans de Goede , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] x86: baytrail/cherrytrail: Rework and move P-Unit PMIC semaphore handling Date: Thu, 11 Oct 2018 16:29:08 +0200 Message-Id: <20181011142911.13750-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 11 Oct 2018 14:29:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, Changes in v3: -Fix iosf_mbi_punit_mutex not being unlocked in error exit path -Add a big comment describing the what-and-why of iosf_mbi_block_punit_i2c_access() Changes in v2: -Move mutex_unlock(&iosf_mbi_punit_mutex); to the callers of iosf_mbi_reset_semaphore() -Use PCI_DEVICE_DATA() to pass the driver_data See the commit message of the first patch for the why and what of this series. Also the whole purpose of posting this series for now is just to get the first patch reviewed and merged, the others are more of a RFC until that happens. Once the first patch is merged we can look at using the new iosf_mbi_[un]block_punit_i2c_access() functions in various drivers for the AXP288 PMIC (and the TI dollarcove PMIC) to only take the P-Unit semaphore once around a group of I2C accesses to the PMIC. The second patch is an example of this. The third patch is some trivial cleanup to the i2c-designware driver which becomes possible after the first patch is merged. As mentioned in the commit message of the first patch, that patch deliberately saves that cleanup for later, so that it only touches i2c-designware-baytrail.c and not the main i2c-designware*.c files, so that it can be merged through the x86 tree without conflicts. Wolfram can we have your ack for merging the i2c-designware-baytrail.c changes through the x86 tree (assuming you are ok with moving all the iosf_mbi magic out of that file into arch/x86/platform/intel/iosf_mbi.c)? Regards, Hans