From patchwork Sat Jan 8 21:45:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 5516 Return-path: Envelope-to: mchehab@pedra Delivery-date: Sun, 09 Jan 2011 17:23:26 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Pc0rN-0003It-RN for mchehab@pedra; Sun, 09 Jan 2011 17:23:26 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 09 Jan 2011 17:23:25 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Pbgbn-0002SU-Ji; Sat, 08 Jan 2011 21:45:59 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840Ab1AHVp5 (ORCPT + 1 other); Sat, 8 Jan 2011 16:45:57 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:37862 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751641Ab1AHVp4 (ORCPT ); Sat, 8 Jan 2011 16:45:56 -0500 Received: by vws16 with SMTP id 16so7617153vws.19 for ; Sat, 08 Jan 2011 13:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=qxl+emdJFMXTPbmjRjg9zJRiL56eV5DTmkhQTx1rnJA=; b=w+/W0YLSEfL41WKMICnungZrC7irm+9EnzOFKYEMEuyQ7xlASXAP6HnqoYF0ykFUUo 63Mv4U/pf9udzBWS9zxQPGrSO1QtpK4hgq77suQ1pV+P+RwZ/bXwqA4pqppp/PZMT9hw vWH+CDCSUlTIeAnn/Ex8dRxHUl3HLmviGG4Kg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=D/mif5vsVx6e7EkUicwOt54ZCgOuiLT3WU3lLgjS3OJD7GobvjT3Ga6fyxbtDW0QEM eLFF0lUZLKWnFK65B+X9REk6OgirvbGVEm4YrtGOAUXSV7EKTQQTqE8GGwB9zpo+wW4v uJJwE8cAjqP9N1gETqVH0wmm3IPghGohN1al4= Received: by 10.220.191.134 with SMTP id dm6mr6223776vcb.12.1294523155730; Sat, 08 Jan 2011 13:45:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.176.12 with HTTP; Sat, 8 Jan 2011 13:45:35 -0800 (PST) From: Christian Gmeiner Date: Sat, 8 Jan 2011 22:45:35 +0100 Message-ID: Subject: [PATCH] adv7175: support s_power To: linux-media@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: This patch adds s_power support to adv7175 driver. Power-down is done by power-down all four DACs. Signed-off-by: Christian Gmeiner --- the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/video/adv7175.c b/drivers/media/video/adv7175.c index f318b51..d2327db 100644 --- a/drivers/media/video/adv7175.c +++ b/drivers/media/video/adv7175.c @@ -303,11 +303,22 @@ static int adv7175_g_chip_ident(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ide return v4l2_chip_ident_i2c_client(client, chip, V4L2_IDENT_ADV7175, 0); } +static int adv7175_s_power(struct v4l2_subdev *sd, int on) +{ + if (on) + adv7175_write(sd, 0x01, 0x00); + else + adv7175_write(sd, 0x01, 0x78); + + return 0; +} + /* ----------------------------------------------------------------------- */ static const struct v4l2_subdev_core_ops adv7175_core_ops = { .g_chip_ident = adv7175_g_chip_ident, .init = adv7175_init, + .s_power = adv7175_s_power, }; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in