Docman - com_docman (Pro feature)

Go to your Joomla backend -> components -> CComment ->settings -> new, from the component dropdown field select com_docman and click next. Save the configuration.

For Docman 1.6.4:

You'll need to make some modifications to your template files. To add the "write comment (x comment)" button to your docs navigate to components/com_docman/themes/yourtheme/templates/documents/list_item.tpl.php and place the following code at the end of the file:

<?php
JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
echo ccommentHelperUtils::commentInit('com_docman', $this->doc);
?>

To add the actual comment form in single view of the documents navigate to components/com_docman/themes/yourtheme/templates/documents/document.tpl.php and at the end of the file add:

<?php
JLoader::discover('ccommentHelper', JPATH_ROOT . '/components/com_comment/helpers');
echo ccommentHelperUtils::commentInit('com_docman', $this);
?>

This is all. Now the comment form should be visible in your docs.