Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2487065imm; Mon, 16 Jul 2018 08:49:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcHAN20sguBLZMBdPR6qK4Dz9Ap+I/Cgnerb2m3yRZptiTtDamfuZiGONfZSC43HncMRJPO X-Received: by 2002:a63:3e0a:: with SMTP id l10-v6mr16275732pga.355.1531756142522; Mon, 16 Jul 2018 08:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531756142; cv=none; d=google.com; s=arc-20160816; b=ewIr6CCWhAXoEf5TRYM5fsmvnZFSW9fKrL2Yo/R9NrrvzkWZGjKJmaXq2k4R/rK3vH jsB2PyD3PUseofGChENbd/kWYOskQep+IVqVH7tlVDwbCSwitAhUljIibJ0C4HXv3GMd 8OZCtpJ7sQ96jvHKGqF35jCQSrigknRTIcjv/MdWdnoqVcF7fvCS0qs4Bnb2ii1Dq/Ci +kaLXsTnfl2WdrEqlB/Q8zfXH+M4HzEIv9OiUn1A6a9Te8QCLxj2txbyS6Dz39BRRU1e wVt//vq26ZcsE+brsJ1oHX3qjiL2tK4gjC2CzC8qtbwRyjswZVFNZCm78C85M3o8dyBp P9Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=fP7rOYuQG4G8KhED01V0G5aV8vBJY/MpeTNEFJSl/Pk=; b=hhgIO8kH6hyHNSLRShdMajFtA0Ow05VcP7CZUxTHRA6rHUQJna1VFBg9w019Rs1fky Iw0hEk1WNcKEKrTpVtCH7Rd7XiK2dc0BS/sEhDFgBQ8Uwcppw8jpUebhJAHEWfvq5UTC ugx4K6X/8/WfwhHdbMI9wH6LSjNlywZID+G4xM+moCsqJGfIGC0YUwqKF1PAfsEEE8hu A6SKh9J3YCT+9+lHcHyGW1brnQkSSr7Q8Mbd2jM25Lw2mmprKaFWNPnfG6nW39W/E0dS cwVZVU/E9iWRbncnsxIWK0QMv5BeDUvuL0B7k6Km5S6Z45tOTsMsrohkzk3hEKL6Xbxx qj3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="B7GzfF/2"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3-v6si24879154pgl.583.2018.07.16.08.48.46; Mon, 16 Jul 2018 08:49:02 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="B7GzfF/2"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729357AbeGPQQK (ORCPT + 99 others); Mon, 16 Jul 2018 12:16:10 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:44957 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727532AbeGPQQK (ORCPT ); Mon, 16 Jul 2018 12:16:10 -0400 Received: by mail-pl0-f67.google.com with SMTP id m16-v6so15431786pls.11; Mon, 16 Jul 2018 08:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=fP7rOYuQG4G8KhED01V0G5aV8vBJY/MpeTNEFJSl/Pk=; b=B7GzfF/2D1bHlg2deGkTAuOYVD7Pb3ywSmxxgG+/1m5AJP6AFQ1K1gaXM5/gnMHT7f LuJjFD3oYNlTZy1z+sR4rJlWfXfAWHqjpAp7I5gx1J4kKMFlKedQDYxvdTg+JEytVvSU J/MqGI+piEraGNzZx8tcl/MarodJaXovC4n9og25nxcWJ7EqH8EWK2neJGXXaqS/zKNN d0gPOXk2Hm3HdEOHSM6k7/FcLonZoMxEEpRXWs3M2rIPbxYCoUXi6/g7SUQ2L7AnRT9q pwq7TjEnAmKEW+CRq3Le3LZYlGNqrP3rpeSEbOPJWZuiz6wElqct6Mi0TaFhkU66ieIg 6XzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fP7rOYuQG4G8KhED01V0G5aV8vBJY/MpeTNEFJSl/Pk=; b=eqo0LTa248KtmOPhNlcMJFwhuuiSCxEnJaKdmo5updQmMZxoidPYRelGDB13h124cJ jfhu0y1NcdnlHwOeHXqc3IIxV0PCXcg83WBOx5B9OU5ObZfPy14I6PHeDzG3jT2DzO6p 2zr+G340nEL26XNkTpOoSh7nrZ8nP9RMS64cqOqrLs9WjPSBmShf46IcQUTnsQpnc5Uy wRQ96sYVv+RT4aCefwFL3l0KgSqpPyysDAMkh/ZOQ9tomEeLNYN+CbpTwRW1ly0zQHUc sn8Ss1FU0COUWz/pztFKRxy17ezqkeyBzsacvBwUTR32zv2AOMZOCHIeqRoIKt2YPJis aXLA== X-Gm-Message-State: AOUpUlFVkjEICwd8rqFe+w57qfFoIx4u/aurcHYx07XEvuE3zwyRgjCG /3Aro/fCPQW1UnDyFKW5mMa2WQ== X-Received: by 2002:a17:902:2983:: with SMTP id h3-v6mr17337636plb.232.1531756089383; Mon, 16 Jul 2018 08:48:09 -0700 (PDT) Received: from localhost.localdomain ([240f:34:212d:1:91ac:ef2:819b:3d04]) by smtp.gmail.com with ESMTPSA id r64-v6sm6195001pfk.157.2018.07.16.08.48.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Jul 2018 08:48:08 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Mark Brown , Peter Rosin , Sebastian Reichel , Wolfram Sang , Sylwester Nawrocki , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH -next v4 0/3] introduce SCCB regmap Date: Tue, 17 Jul 2018 00:47:47 +0900 Message-Id: <1531756070-8560-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces Serial Camera Control Bus (SCCB) support for regmap API and convert ov772x and ov9650 drivers to use it. This patchset was previously submitted as "introduce SCCB helpers" that provides three functions (sccb_is_available, sccb_read_byte, and sccb_write_byte). This time, the helpers are replaced by regmap API, but internal code is not much changed from the previous version. * v4 - Introduce SCCB regmap instead of helper functions, suggested by Sebastian Reichel - Change ov772x driver to use regmap instead of helper functions - Add register access conversion for ov9650 driver * v3 - Rewrite the helpers based on the code provided by Wolfram - Convert ov772x driver to use SCCB helpers v2 - Convert all helpers into static inline functions, and remove C source and Kconfig option. - Acquire i2c adapter lock while issuing two requests for sccb_read_byte Akinobu Mita (3): regmap: add SCCB support media: ov772x: use SCCB regmap media: ov9650: use SCCB regmap drivers/base/regmap/Kconfig | 4 + drivers/base/regmap/Makefile | 1 + drivers/base/regmap/regmap-sccb.c | 128 +++++++++++++++++++++++++ drivers/media/i2c/Kconfig | 2 + drivers/media/i2c/ov772x.c | 192 ++++++++++++++++---------------------- drivers/media/i2c/ov9650.c | 157 +++++++++++++++---------------- include/linux/regmap.h | 35 +++++++ 7 files changed, 326 insertions(+), 193 deletions(-) create mode 100644 drivers/base/regmap/regmap-sccb.c Cc: Mark Brown Cc: Peter Rosin Cc: Sebastian Reichel Cc: Wolfram Sang Cc: Sylwester Nawrocki Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab -- 2.7.4