From patchwork Mon Apr 26 16:26:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Gronlier X-Patchwork-Id: 95090 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3QGPM7K032009 for ; Mon, 26 Apr 2010 16:25:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753397Ab0DZQZV (ORCPT ); Mon, 26 Apr 2010 12:25:21 -0400 Received: from lo.gmane.org ([80.91.229.12]:54079 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516Ab0DZQZU (ORCPT ); Mon, 26 Apr 2010 12:25:20 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O6R7Q-0006uU-U7 for linux-media@vger.kernel.org; Mon, 26 Apr 2010 18:25:12 +0200 Received: from 92.103.125.220 ([92.103.125.220]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Apr 2010 18:25:12 +0200 Received: from ticapix by 92.103.125.220 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Apr 2010 18:25:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-media@vger.kernel.org connect(): No such file or directory From: "pierre.gronlier" Subject: [PATCH] Read MAC for TeVii S470 PCI-e DVB-S2 card Date: Mon, 26 Apr 2010 18:26:29 +0200 Lines: 84 Message-ID: Mime-Version: 1.0 X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 92.103.125.220 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100411 Iceowl/1.0b1 Icedove/3.0.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 26 Apr 2010 16:25:23 +0000 (UTC) Read MAC for TeVii S470 PCI-e DVB-S2 card. Signed-off-by: Pierre Gronlier diff --git a/linux/drivers/media/video/cx23885/cx23885-dvb.c b/linux/drivers/media/video/cx23885/cx23885-dvb.c --- a/linux/drivers/media/video/cx23885/cx23885-dvb.c +++ b/linux/drivers/media/video/cx23885/cx23885-dvb.c @@ -929,6 +929,22 @@ netup_ci_init(port); break; } + case CX23885_BOARD_TEVII_S470: { + u8 eeprom[256]; /* 24C02 i2c eeprom */ + + if (port->nr != 1) + break; + + /* Read entire EEPROM */ + dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1; + tveeprom_read(&dev->i2c_bus[0].i2c_client, eeprom, sizeof(eeprom)); + printk(KERN_INFO "TeVii S470 MAC= " + "%02X:%02X:%02X:%02X:%02X:%02X\n", + eeprom[0xa0], eeprom[0xa1], eeprom[0xa2], + eeprom[0xa3], eeprom[0xa4], eeprom[0xa5]); + memcpy(port->frontends.adapter.proposed_mac, eeprom + 0xa0, 6); + break; + } } return ret;