From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92BAFC54EBE for ; Sun, 8 Jan 2023 09:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232364AbjAHJZK (ORCPT ); Sun, 8 Jan 2023 04:25:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjAHJZJ (ORCPT ); Sun, 8 Jan 2023 04:25:09 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFFF4101CB; Sun, 8 Jan 2023 01:25:06 -0800 (PST) Received: from [192.168.1.15] (91-154-32-225.elisa-laajakaista.fi [91.154.32.225]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 88EB36CF; Sun, 8 Jan 2023 10:25:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1673169903; bh=sJs7Ppbi3G3hierAzEkA9g+MrKJHmMhM9EkUX5dPlbo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=COiQYSvTDJ4eI66dEg8pn830E3GipuNZ9pv5wWRYbwyFD6o59MmCRcAeT/a51d951 ZeEzxCPdLVEmnto3g3C+0boWZ1uFQrlrjlq7Ij3km5HZOCRklTBEe+ii0ARPAhI5+x mnFpgElC0+Uab2/r/m3spRX/L+X316krgOCFRyAc= Message-ID: <90bc0464-fa49-bd57-5460-d7d2a4bb6b65@ideasonboard.com> Date: Sun, 8 Jan 2023 11:24:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v6 1/8] i2c: core: let adapters be notified of client attach/detach To: Laurent Pinchart Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Wolfram Sang , Luca Ceresoli , Andy Shevchenko , Matti Vaittinen , Mauro Carvalho Chehab , Peter Rosin , Liam Girdwood , Mark Brown , Sakari Ailus , Michael Tretter , Shawn Tu , Hans Verkuil , Mike Pagano , =?UTF-8?Q?Krzysztof_Ha=c5=82asa?= , Marek Vasut , Luca Ceresoli References: <20230105140307.272052-1-tomi.valkeinen@ideasonboard.com> <20230105140307.272052-2-tomi.valkeinen@ideasonboard.com> Content-Language: en-US From: Tomi Valkeinen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On 08/01/2023 05:13, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Thu, Jan 05, 2023 at 04:03:00PM +0200, Tomi Valkeinen wrote: >> From: Luca Ceresoli >> >> An adapter might need to know when a new device is about to be >> added. This will soon bee needed to implement an "I2C address >> translator" (ATR for short), a device that propagates I2C transactions >> with a different slave address (an "alias" address). An ATR driver >> needs to know when a slave is being added to find a suitable alias and >> program the device translation map. >> >> Add an attach/detach callback pair to allow adapter drivers to be >> notified of clients being added and removed. > > I've asked in the review of v6 if we could instead use the > BUS_NOTIFY_ADD_DEVICE and BUS_NOTIFY_DEL_DEVICE bus notifiers. There's > been a follow up discussion with Andy, but no reply from you AFAICS. > Have you given this a try ? It's not a mandatory requirement, but if it > can't be done (or shouldn't be done), I'd like to know why. Sorry, I meant to mention this in the cover letter, but forgot: I haven't looked at the bus notifiers yet, but will have a look. I wanted to send a new revision due to the large amount of changes already done. Tomi