From owner-freebsd-arm@freebsd.org Tue Aug 18 19:05:34 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86FC83C413E for ; Tue, 18 Aug 2020 19:05:34 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from frog.mh.net.ru (mh.balakovo.san.ru [88.147.158.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BWL3110DDz4Vjv for ; Tue, 18 Aug 2020 19:05:31 +0000 (UTC) (envelope-from mishin@mh.net.ru) Received: from webmail.mh.net.ru (mouse.home [192.168.5.6]) by frog.mh.net.ru (Postfix) with ESMTPSA id 3B16FABA83 for ; Tue, 18 Aug 2020 23:05:21 +0400 (+04) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 18 Aug 2020 23:05:20 +0400 From: Alexander Mishin To: freebsd-arm@freebsd.org Subject: Kmod driver at iicbus. attach() and config_intrhook(9) User-Agent: Roundcube Webmail/1.4.2 Message-ID: <7fabb65d99aaa74775c1daa91bffb873@mh.net.ru> X-Sender: mishin@mh.net.ru X-Rspamd-Queue-Id: 4BWL3110DDz4Vjv X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=mh.net.ru (policy=none); spf=fail (mx1.freebsd.org: domain of mishin@mh.net.ru does not designate 88.147.158.22 as permitted sender) smtp.mailfrom=mishin@mh.net.ru X-Spamd-Result: default: False [1.53 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_FAIL(1.00)[-all]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.53)[0.528]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12389, ipnet:88.147.128.0/17, country:RU]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm]; DMARC_POLICY_SOFTFAIL(0.10)[mh.net.ru : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Aug 2020 19:05:34 -0000 Hi I write a kmod driver for bh1750 light sensor with iic (almost wrote). As usual, probe(), attach() and detach(). On attach() it runs TIMEOUT_TASK_INIT for periodically write opecode, read result and place it to sysctl dev.bh1750.N variables. It is all. But I see that some other devices (from /usr/src/sys/dev) uses CONFIG_INTRHOOK(9) on attach() for initialize themselfs. I wonder if I need this too? ...or maybe... when I might need it? Thanks --- There is the source if it needed: https://gitlab.com/alexandermishin13/bh1750-kmod/