Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2010 16:56:26 +0000
From:      Paul B Mahol <onemda@gmail.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Lev Serebryakov <lev@serebryakov.spb.ru>, freebsd-usb@freebsd.org
Subject:   Re: Two questions: how to specify module-load function for driver module and which name of driver is better (according to "standards")
Message-ID:  <AANLkTin7ZH9wBKffYaK3DXiuYtptsmd_is5dnyw2vKAU@mail.gmail.com>
In-Reply-To: <201011191720.15402.hselasky@c2i.net>
References:  <441397602.20101119185527@serebryakov.spb.ru> <201011191720.15402.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
2010/11/19 Hans Petter Selasky <hselasky@c2i.net>:
> On Friday 19 November 2010 16:55:27 Lev Serebryakov wrote:
>> Hello, Freebsd-usb.
>>
>> =A0 I've =A0implemented =A0driver (ucom-subdriver) for MosChip 7820 and =
7840
>> =A0USB2COM multiport bridges. I have two questions:
>>
>
> Hi,
>
>> =A0 (1) =A0How =A0should =A0I =A0specify =A0module-load =A0function? DRI=
VER_MODULE()
>> =A0 doesn't =A0 help =A0 much. =A0I =A0need =A0to run some code only onc=
e, at very
>> =A0 beginning, =A0not =A0for each probe/attach. GEOM modules have method=
s for
>> =A0 it, but I can not find such methods for drivers.
>
> Look at ubt_modevent in sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c. Or u=
se a
> so-called SYSINIT() or SYSUNINIT().
>
>>
>> =A0 (2) Which name should I choose? Working name of module/driver/device
>> =A0 is "mos7840", but it seems, that it is bad name:
>> =A0 =A0(a) All existing ucom-based drivers is "uXXXcom"
>> =A0 =A0(b) Driver instances looks ugly (like "mos78400")
> umos78400 ?
>
>>
>> =A0 Is =A0"umos7840com" =A0good name or it is too long? :) We have "umos=
com"
>> =A0 driver for older MosChip chip in base already.
>
> Maybe someone else has some comments.

Is it possible/sane to integrate two drivers in one?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin7ZH9wBKffYaK3DXiuYtptsmd_is5dnyw2vKAU>