From: Takashi Iwai Subject: Re: [PATCH] [ALSA] Allow setting codec register with sys filesystem Date: Mon, 06 Oct 2008 12:03:32 +0200 Message-ID: References: <1223164449-4133-1-git-send-email-troy.kisky@boundarydevices.com> <20081006095856.GA14087@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20081006095856.GA14087@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, patch@alsa-project.org, Troy Kisky List-Id: alsa-devel@alsa-project.org At Mon, 6 Oct 2008 10:58:57 +0100, Mark Brown wrote: > > On Sat, Oct 04, 2008 at 04:54:09PM -0700, Troy Kisky wrote: > > i.e. echo 6 59 >/sys/devices/platform/soc-audio.0/codec_reg > > will set register 0x06 to a value of 0x59 > > > Signed-off-by: Troy Kisky > > I'd probably take a patch to do this in debugfs but I don't think it is > appropriate to do this in sysfs. Writing to the registers outside the > control of the drivers can seriously interfere with their operation and > confuse user space - it's something you can get away with if you know > what you're doing but it's not something that should be available as a > standard, advertised interface. There's also the possibility of the > driver trampling over any settings made with this interface which > wouldn't be helpful either. Putting into debugfs sounds like a saner option, as this is only for debugging. OTOH, symmetrical read/write operations also good. Will be the sysfs register show op moved to debugfs, too? thanks, Takashi