From patchwork Mon Sep 17 16:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10602981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9248013AD for ; Mon, 17 Sep 2018 16:03:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7073205A8 for ; Mon, 17 Sep 2018 16:03:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A41022376; Mon, 17 Sep 2018 16:03:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47574205A8 for ; Mon, 17 Sep 2018 16:03:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbeIQVbY (ORCPT ); Mon, 17 Sep 2018 17:31:24 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:34850 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbeIQVbY (ORCPT ); Mon, 17 Sep 2018 17:31:24 -0400 Received: by mail-pf1-f196.google.com with SMTP id p12-v6so7780031pfh.2 for ; Mon, 17 Sep 2018 09:03:24 -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=kB2ndcT55ysL+0JTjlc0dTfNMXFSerOLGjcF+FpAAEk=; b=aGB78rlGODlV4nOGA7Hjh4utHeWysA/JC4lGc7DAbr+gsRwBdGAqtcsazd0gcjoGty wyWnfnGtpvgnArcICUNonkByPAcag55uX3e4LohAsvLks43ifl5paiXEWt9bAcKfQ32q vNOdhTG+UGQqdLedM/T3tOLm6zeVgHZQ7rctwPOeBuZlEqhL53Fjd78Te5VP9/P1Hyj4 L2L5csclCva+S3CuAlEBLHY5WbNxp6w4SlVyI8RhrNGgw+CjxcPG16Vvqp0DozwHpSBN cC2yxuXrUJz2KCiBGbtun/AL+VuWO8P8b09T+Izf6D9NO49dskzU7va00VeDXT6I6NWg M63A== 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=kB2ndcT55ysL+0JTjlc0dTfNMXFSerOLGjcF+FpAAEk=; b=DxZ9WjQVnlfCmbG6Vw7jJ8xNX6LYSGLvW+DUk0ZQazFMGZFRZRdg8ZOtucFW2B3q1z iEqVamz2tQcrXxjHdlaHe9nCXFYGlgJfbzDCEQsTH6EhMEA6/zRG4j3DwTaxTatY/CmC MHlN+YJAGM6GHcTv1ZQpcCWboBA1xHQoGRyPrUykYkfI2gBToh5rsdurlp8L+5iXAGZN ipnd7NYRSscG7qwPDS1N/LOucgPZh4mqRJzOzO6BmJdjn7eZ4wwpe+Iuz1iaWL14FDAj MQgjYmbpWhQCgBS5FICqUae4cu75jWJPi0790sz9jtXr2/vr1R/1of+po03Rp6seBV5l aE3Q== X-Gm-Message-State: APzg51BDK8n8Z/wonJAI4hlh75Akqyqu9aiYVNCMBMRMJgie3Hi38Cdw GWFGAKTeB9GcwtOBl48x3n3N0Xx4 X-Google-Smtp-Source: ANB0VdZLETjSO8TBVkaxi727U3qOzUU9Mo+cXD7Bd3k7Qmarl106cMN6TaId1qsLCwMtu7foa0JSLQ== X-Received: by 2002:a62:858c:: with SMTP id m12-v6mr26742979pfk.173.1537200204479; Mon, 17 Sep 2018 09:03:24 -0700 (PDT) Received: from mita-MS-7A45.lan ([240f:34:212d:1:f447:4113:b862:c2f5]) by smtp.gmail.com with ESMTPSA id p3-v6sm20088607pfo.130.2018.09.17.09.03.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Sep 2018 09:03:23 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Matt Ranostay , Sakari Ailus , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 0/5] media: video-i2c: support changing frame interval and runtime PM Date: Tue, 18 Sep 2018 01:03:06 +0900 Message-Id: <1537200191-17956-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds support for changing frame interval and runtime PM for video-i2c driver. This also adds an helper function to v4l2 common internal API that is used to to find a suitable frame interval. There are a couple of unrelated changes that are included for simplifying driver initialization code and register accesses. Akinobu Mita (5): media: video-i2c: avoid accessing released memory area when removing driver media: video-i2c: use i2c regmap media: v4l2-common: add v4l2_find_closest_fract() media: video-i2c: support changing frame interval media: video-i2c: support runtime PM drivers/media/i2c/video-i2c.c | 276 ++++++++++++++++++++++++++++------ drivers/media/v4l2-core/v4l2-common.c | 26 ++++ include/media/v4l2-common.h | 12 ++ 3 files changed, 267 insertions(+), 47 deletions(-) Cc: Matt Ranostay Cc: Sakari Ailus Cc: Hans Verkuil Cc: Mauro Carvalho Chehab